EricWF added inline comments.
================ Comment at: lib/Sema/AnalysisBasedWarnings.cpp:378 const Stmt *S = CS.getStmt(); - if ((isa<ReturnStmt>(S) && !IsCoroutine) || isa<CoreturnStmt>(S)) { + if (isa<ReturnStmt>(S) || isa<CoreturnStmt>(S)) { HasLiveReturn = true; ---------------- GorNishanov wrote: > Is this check no longer needed because of the changes to > AnalysisDeclContext.cpp? > > At some point it was needed because we were emitting "return gro" to produce > the immediate return value from the coroutine, but, we wanted to flag the > case when the user forgot to add "co_return" I couldn't exactly figure out why this was no longer needed, but it appears we don't traverse those implicitly created return statements. I made sure to test this particular part of the change to ensure it didn't regress behavior. If you look at the changes for `coreturn.cpp` you should see that case exercised. https://reviews.llvm.org/D33532 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits