[clang] [clang] Improve diagnostic on [[nodiscard]] attribute (PR #112521)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 07:28:23 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]]``
----------------
erichkeane wrote:
I'm not sure this is really a 'potentially breaking change' so much as just a diagnostic change?
https://github.com/llvm/llvm-project/pull/112521
More information about the cfe-commits
mailing list