[clang] [clang] Improve diagnostic on [[nodiscard]] attribute (PR #112521)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 22 11:09:02 PDT 2024
Sirraide wrote:
> My opinion is that the function's attribute should take precedence since it is "more specific". GCC/MSVC trunk agrees with me and prints Reason 2 in warning, while Clang trunk prints Reason 1. ([Compiler Explorer](https://godbolt.org/z/h3dYoe96c)). After this PR, Clang will also print Reason 2 here.
That sounds reasonable, yeah.
https://github.com/llvm/llvm-project/pull/112521
More information about the cfe-commits
mailing list