This revision was automatically updated to reflect the committed changes.
Closed by commit rL316166: Fix nodiscard for volatile references (authored by
erichkeane).
Changed prior to commit:
https://reviews.llvm.org/D39075?vs=119535&id=119588#toc
Repository:
rL LLVM
https://reviews.llvm.org/
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
https://reviews.llvm.org/D39075
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman
erichkeane updated this revision to Diff 119535.
erichkeane added a comment.
Added function-pointer test.
https://reviews.llvm.org/D39075
Files:
lib/AST/Expr.cpp
test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp
Index: lib/AST/Expr.cpp
===
erichkeane added inline comments.
Comment at: lib/AST/Expr.cpp:2302
+ cast(DRE->getDecl())->hasLocalStorage()) &&
+!isa(CE->getSubExpr()->IgnoreParens())) {
return CE->getSubExpr()->isUnusedResultAWarning(WarnE, Loc,
aaron.ball
aaron.ballman added inline comments.
Comment at: lib/AST/Expr.cpp:2302
+ cast(DRE->getDecl())->hasLocalStorage()) &&
+!isa(CE->getSubExpr()->IgnoreParens())) {
return CE->getSubExpr()->isUnusedResultAWarning(WarnE, Loc,
Does th
erichkeane created this revision.
As reported here https://bugs.llvm.org/show_bug.cgi?id=34988
[[nodiscard]] warnings were not being suppressed for
volatile-ref return values.
https://reviews.llvm.org/D39075
Files:
lib/AST/Expr.cpp
test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp
Inde