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
Event Timeline
lib/AST/Expr.cpp | ||
---|---|---|
2302 | 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 | I added this test, and it seems to work correctly. Patch with additional test incoming. |
Does this properly handle calls through function pointers (which usually have implicit casts)?