rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land.
LGTM ================ Comment at: lib/Sema/AnalysisBasedWarnings.cpp:338 + // In a coroutine, only co_return statements count as normal returns. Remember + // if we are processing the coroutine or not. + const bool IsCoroutine = isa<CoroutineBodyStmt>(AC.getBody()); ---------------- the -> a ================ Comment at: lib/Sema/SemaCoroutine.cpp:1079-1083 + // FIXME: ActOnReturnStmt expects a scope that is inside of the function, due + // to CheckJumpOutOfSEHFinally(*this, ReturnLoc, *CurScope->getFnParent()); + // S.getCurScope()->getFnParent() == nullptr at ActOnFinishFunctionBody when + // CoroutineBodyStmt is built. Figure it out and fix it. + // Use BuildReturnStmt here to unbreak sanitized tests. (Gor:3/27/2017) ---------------- I'm not sure you need this FIXME; using `BuildReturnStmt` here instead of `ActOnReturnStmt` to skip the checks that we apply to parsed return statements but not instantiated return statements seems appropriate to me, so there's probably nothing to fix. https://reviews.llvm.org/D31646 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits