[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2019-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2019-01-02 Thread Erik Pilkington via Phabricator via cfe-commits
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

[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2019-01-02 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2018-12-21 Thread Aaron Ballman via Phabricator via 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

[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2018-12-21 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2018-12-20 Thread Erik Pilkington via Phabricator via cfe-commits
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

[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2018-12-20 Thread Aaron Ballman via Phabricator via cfe-commits
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