[clang] [clang] Improve diagnostic on [[nodiscard]] attribute (PR #112521)
Yihe Li via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 07:31:07 PST 2024
================
@@ -148,6 +148,19 @@ C++ Specific Potentially Breaking Changes
// Now diagnoses with an error.
void f(int& i [[clang::lifetimebound]]);
+- Clang will now prefer the ``[[nodiscard]]`` declaration on function declarations over ``[[nodiscard]]``
----------------
Mick235711 wrote:
On further thought, indeed the whole PR does change the diagnostics message anyway, so indeed it should also be in the diagnostics section.
https://github.com/llvm/llvm-project/pull/112521
More information about the cfe-commits
mailing list