[clang] [clang] Improve diagnostic on [[nodiscard]] attribute (PR #112521)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 06:27:46 PST 2024
================
@@ -17,10 +17,10 @@ E get_e();
// cxx11-warning at -1 {{use of the 'nodiscard' attribute is a C++17 extension}}
void f() {
- get_s(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
+ get_s(); // expected-warning {{ignoring return value of type 'S' declared with 'nodiscard' attribute}}
----------------
erichkeane wrote:
The suggested change was to remove just the `of`. But reading it again, I'm not agreeing with myself anymore. Just ignore this request.
https://github.com/llvm/llvm-project/pull/112521
More information about the cfe-commits
mailing list