aaron.ballman closed this revision.
aaron.ballman added a comment.
Committed in r350317.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55949/new/
https://reviews.llvm.org/D55949
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
erik.pilkington accepted this revision.
erik.pilkington added a comment.
This revision is now accepted and ready to land.
Still LG, sorry for the delay!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55949/new/
https://reviews.llvm.org/D55949
aaron.ballman added a comment.
Ping
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55949/new/
https://reviews.llvm.org/D55949
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
aaron.ballman requested review of this revision.
aaron.ballman added a comment.
There's enough churn based on the review feedback that this should probably
have a second round of review just to be sure.
Comment at: lib/AST/Expr.cpp:2281-2286
+ // If there is no
aaron.ballman updated this revision to Diff 179318.
aaron.ballman marked 3 inline comments as done.
aaron.ballman added a comment.
Updated based on review feedback.
Moved `FunctionDecl::hasUnusedResultAttr()` and
`FunctionDecl::getUnusedResultAttr()` to `CallExpr` to reduce logic duplication
erik.pilkington accepted this revision.
erik.pilkington added a comment.
This revision is now accepted and ready to land.
LGTM!
Comment at: lib/AST/Expr.cpp:2281-2286
+ // If there is no FunctionDecl for the call, check the return type of the
+ // callee to see if it
aaron.ballman created this revision.
aaron.ballman added reviewers: rsmith, Quuxplusone, erik.pilkington.
When a function returns a type and that type was declared `[[nodiscard]]`, we
diagnose any unused results from that call as though the function were marked
nodiscard. The same behavior