GorNishanov 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;
----------------
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"


https://reviews.llvm.org/D33532



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to