Skip to content
Snippets Groups Projects
  • Eric Fiselier's avatar
    603fc45e
    [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt. · 603fc45e
    Eric Fiselier authored
    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
    603fc45e
    History
    [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.
    Eric Fiselier authored
    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
Code owners
Assign users and groups as approvers for specific file changes. Learn more.