-
- Downloads
[coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.
Summary: The changes contained in this patch are: 1. Defines a new AST node `CoawaitDependentExpr` for representing co_await expressions while the promise type is still dependent. 2. Correctly detect and transform the 'co_await' operand to `p.await_transform(<expr>)` when possible. 3. Change the initial/final suspend points to build during the initial parse, so they have the correct operator co_await lookup results. 4. Fix transformation of the CoroutineBodyStmt so that it doesn't re-build the final/initial suspends. @rsmith: This change is a little big, but it's not trivial for me to split it up. Please let me know if you would prefer this submitted as multiple patches. Reviewers: rsmith, GorNishanov Reviewed By: rsmith Subscribers: ABataev, rsmith, mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D26057 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297093 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/ExprCXX.h 55 additions, 4 deletionsinclude/clang/AST/ExprCXX.h
- include/clang/AST/RecursiveASTVisitor.h 6 additions, 0 deletionsinclude/clang/AST/RecursiveASTVisitor.h
- include/clang/AST/Stmt.h 12 additions, 0 deletionsinclude/clang/AST/Stmt.h
- include/clang/AST/StmtCXX.h 15 additions, 7 deletionsinclude/clang/AST/StmtCXX.h
- include/clang/Basic/DiagnosticSemaKinds.td 6 additions, 2 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- include/clang/Basic/StmtNodes.td 1 addition, 0 deletionsinclude/clang/Basic/StmtNodes.td
- include/clang/Sema/ScopeInfo.h 27 additions, 1 deletioninclude/clang/Sema/ScopeInfo.h
- include/clang/Sema/Sema.h 11 additions, 4 deletionsinclude/clang/Sema/Sema.h
- lib/AST/Expr.cpp 1 addition, 0 deletionslib/AST/Expr.cpp
- lib/AST/ExprClassification.cpp 1 addition, 0 deletionslib/AST/ExprClassification.cpp
- lib/AST/ExprConstant.cpp 1 addition, 0 deletionslib/AST/ExprConstant.cpp
- lib/AST/ItaniumMangle.cpp 6 additions, 0 deletionslib/AST/ItaniumMangle.cpp
- lib/AST/StmtPrinter.cpp 7 additions, 0 deletionslib/AST/StmtPrinter.cpp
- lib/AST/StmtProfile.cpp 4 additions, 0 deletionslib/AST/StmtProfile.cpp
- lib/Parse/ParseStmt.cpp 1 addition, 1 deletionlib/Parse/ParseStmt.cpp
- lib/Sema/ScopeInfo.cpp 3 additions, 0 deletionslib/Sema/ScopeInfo.cpp
- lib/Sema/SemaCoroutine.cpp 321 additions, 212 deletionslib/Sema/SemaCoroutine.cpp
- lib/Sema/SemaDecl.cpp 1 addition, 1 deletionlib/Sema/SemaDecl.cpp
- lib/Sema/SemaExceptionSpec.cpp 1 addition, 0 deletionslib/Sema/SemaExceptionSpec.cpp
- lib/Sema/TreeTransform.h 130 additions, 7 deletionslib/Sema/TreeTransform.h
Loading
Please register or sign in to comment