================
@@ -416,6 +416,9 @@ Improvements to Clang's diagnostics
   name was a reserved name, which we improperly allowed to suppress the
   diagnostic.
 
+- Clang now includes the return type of the function or constructor in the 
warning generated
+  when `[[nodiscard]]` is triggered by its placement on return types instead 
of function itself.
----------------
Sirraide wrote:

```suggestion
- When diagnosing an unused return value of a type declared ``[[nodiscard]]``, 
the type
  itself is now included in the diagnostic.
```
I think this way it’s a bit easier to understand what’s happening here. This is 
the best I could do while trying to avoid the mouthful that is ‘ignoring a 
value returned from a call to a function returning a type marked nodiscard’.

https://github.com/llvm/llvm-project/pull/112521
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to