[PATCH] D33532: [coroutines] Fix fallthrough diagnostics for coroutines

2017-05-24 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov accepted this revision. GorNishanov added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D33532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D33532: [coroutines] Fix fallthrough diagnostics for coroutines

2017-05-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:378 const Stmt *S = CS.getStmt(); -if ((isa(S) && !IsCoroutine) || isa(S)) { +if (isa(S) || isa(S)) { HasLiveReturn = true; GorNishanov wrote: > Is this check no long

[PATCH] D33532: [coroutines] Fix fallthrough diagnostics for coroutines

2017-05-24 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:378 const Stmt *S = CS.getStmt(); -if ((isa(S) && !IsCoroutine) || isa(S)) { +if (isa(S) || isa(S)) { HasLiveReturn = true; Is this check no longer needed becaus

[PATCH] D33532: [coroutines] Fix fallthrough diagnostics for coroutines

2017-05-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch fixes a number of issues with the analysis warnings emitted when a coroutine may reach the end of the function w/o returning. - Fix bug where coroutines with `return_value` are incorrectly diagnosed as missing `co_return`'s. - Rework diagnostic message t