[clang] [clang] Improve diagnostic on [[nodiscard]] attribute (PR #112521)
Yihe Li via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 06:23:56 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}}
----------------
Mick235711 wrote:
Umm... the error message does say "ignoring return value of type 'S'", do you want me to remove that of in general?
https://github.com/llvm/llvm-project/pull/112521
More information about the cfe-commits
mailing list