As reported here https://bugs.llvm.org/show_bug.cgi?id=34988
[[nodiscard]] warnings were not being suppressed for
volatile-ref return values.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/AST/Expr.cpp | ||
|---|---|---|
| 2302 ↗ | (On Diff #119528) | Does this properly handle calls through function pointers (which usually have implicit casts)? [[nodiscard]] volatile char &(*fp)();
void g() {
(void)fp(); // No diagnostic here, either?
} |
| lib/AST/Expr.cpp | ||
|---|---|---|
| 2302 ↗ | (On Diff #119528) | I added this test, and it seems to work correctly. Patch with additional test incoming. |