| commit | cfc20ea15eea5704a79dd4e8d0eaeef4cf053268 | [log] [tgz] |
|---|---|---|
| author | Doug Wyatt <doug@sonosphere.com> | Wed Jul 16 08:24:28 2025 -0700 |
| committer | GitHub <noreply@github.com> | Wed Jul 16 08:24:28 2025 -0700 |
| tree | 7e5c9bfbd608df58c5a1caf2f4a39db5ea249ed4 | |
| parent | a89e6f66722713addd3a7a60377ddbb38add4702 [diff] |
[Clang] FunctionEffects: Make a separate diagnostic group for redeclarations/overrides where effects are implicit. (#148690) The current function effect diagnostics include these behaviors: When you declare a function `nonblocking` (typically in a header) and then omit the attribute on the implementation (or any other redeclaration), Clang warns: attribute 'nonblocking' on function does not match previous declaration. But if a `nonblocking` function is a C++ virtual method, then overrides are implicitly nonblocking; the attribute doesn't need to be explicitly stated. These behaviors are arguably inconsistent -- and also, both, more pedantic than the rest of the function effect diagnostics. This PR accomplishes two things: - Separates the diagnostic on a redeclaration into a new group, `-Wfunction-effect-redeclarations`, so it can be disabled independently. - Adds a second diagnostic to this new group, for the case of an override method missing the attribute. (This helps in a situation where I'm trying to add `nonblocking` via a macro that does other things and I want to know that the macro is missing on an override declaration.) --------- Co-authored-by: Doug Wyatt <dwyatt@apple.com> Co-authored-by: Sirraide <aeternalmail@gmail.com>
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.