[PATCH] D39075: Fix nodiscard for volatile references

2017-10-19 Thread Erich Keane via Phabricator via cfe-commits
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/

[PATCH] D39075: Fix nodiscard for volatile references

2017-10-19 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D39075: Fix nodiscard for volatile references

2017-10-18 Thread Erich Keane via Phabricator via cfe-commits
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 ===

[PATCH] D39075: Fix nodiscard for volatile references

2017-10-18 Thread Erich Keane via Phabricator via cfe-commits
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

[PATCH] D39075: Fix nodiscard for volatile references

2017-10-18 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D39075: Fix nodiscard for volatile references

2017-10-18 Thread Erich Keane via Phabricator via cfe-commits
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