diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-28 23:09:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-28 23:09:46 +0000 |
commit | 30116531b8a9acc0b25648f9e27c11265d149d60 (patch) | |
tree | 7defe572be6841f9f37770eb973703c3a5c21409 /clang/test/AST/ast-dump-expr.cpp | |
parent | e925be1339052b2f363d1b708370a45868fada04 (diff) | |
download | bcm5719-llvm-30116531b8a9acc0b25648f9e27c11265d149d60.tar.gz bcm5719-llvm-30116531b8a9acc0b25648f9e27c11265d149d60.zip |
Defer creating fields for captures until we finish building the
capturing expression or statement.
No functionality change yet. The intent is that we will also delay
building the initialization expression until the enclosing context, so
that:
a) we build the initialization expression in the right context, and
b) we can elide captures that are not odr-used, as suggested by P0588R1.
This also consolidates some duplicated code building capture fields into
a single place.
llvm-svn: 361893
Diffstat (limited to 'clang/test/AST/ast-dump-expr.cpp')
-rw-r--r-- | clang/test/AST/ast-dump-expr.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/test/AST/ast-dump-expr.cpp b/clang/test/AST/ast-dump-expr.cpp index 96d3df34cb4..693dd573079 100644 --- a/clang/test/AST/ast-dump-expr.cpp +++ b/clang/test/AST/ast-dump-expr.cpp @@ -252,9 +252,9 @@ void PrimaryExpressions(Ts... a) { // CHECK-NEXT: CopyAssignment // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor - // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:8> col:8 implicit 'V *' // CHECK-NEXT: CXXMethodDecl // CHECK-NEXT: CompoundStmt + // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:8> col:8 implicit 'V *' // CHECK-NEXT: CXXThisExpr 0x{{[^ ]*}} <col:8> 'V *' implicit this [*this]{}; @@ -267,9 +267,9 @@ void PrimaryExpressions(Ts... a) { // CHECK-NEXT: CopyAssignment // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor - // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:8> col:8 implicit 'V' // CHECK-NEXT: CXXMethodDecl // CHECK-NEXT: CompoundStmt + // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:8> col:8 implicit 'V' // CHECK-NEXT: ParenListExpr 0x{{[^ ]*}} <col:8> 'NULL TYPE' // CHECK-NEXT: UnaryOperator 0x{{[^ ]*}} <col:8> '<dependent type>' prefix '*' cannot overflow // CHECK-NEXT: CXXThisExpr 0x{{[^ ]*}} <col:8> 'V *' implicit this @@ -322,9 +322,9 @@ void PrimaryExpressions(Ts... a) { // CHECK-NEXT: CopyAssignment // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor - // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:4> col:4 implicit 'Ts...' // CHECK-NEXT: CXXMethodDecl 0x{{[^ ]*}} <col:8, col:10> col:3 operator() 'auto () const -> auto' inline // CHECK-NEXT: CompoundStmt + // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:4> col:4 implicit 'Ts...' // CHECK-NEXT: ParenListExpr 0x{{[^ ]*}} <col:4> 'NULL TYPE' // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:4> 'Ts...' lvalue ParmVar 0x{{[^ ]*}} 'a' 'Ts...' // CHECK-NEXT: CompoundStmt 0x{{[^ ]*}} <col:9, col:10> @@ -403,8 +403,6 @@ void PrimaryExpressions(Ts... a) { // CHECK-NEXT: CopyAssignment // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor - // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:4> col:4 implicit 'int' - // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:8> col:8 implicit 'int &' // CHECK-NEXT: CXXMethodDecl 0x{{[^ ]*}} <col:9, col:26> col:3 operator() 'auto () const -> auto' inline // CHECK-NEXT: CompoundStmt // CHECK-NEXT: ReturnStmt 0x{{[^ ]*}} <col:12, col:23> @@ -413,6 +411,8 @@ void PrimaryExpressions(Ts... a) { // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:19> 'const int' lvalue Var 0x{{[^ ]*}} 'b' 'int' // CHECK-NEXT: ImplicitCastExpr // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:23> 'int' lvalue Var 0x{{[^ ]*}} 'c' 'int' + // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:4> col:4 implicit 'int' + // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:8> col:8 implicit 'int &' // CHECK-NEXT: ImplicitCastExpr // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:4> 'int' lvalue Var 0x{{[^ ]*}} 'b' 'int' // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:8> 'int' lvalue Var 0x{{[^ ]*}} 'c' 'int' @@ -434,10 +434,10 @@ void PrimaryExpressions(Ts... a) { // CHECK-NEXT: CopyAssignment // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor - // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:4> col:4 implicit 'Ts...' - // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:10> col:10 implicit 'int':'int' // CHECK-NEXT: CXXMethodDecl 0x{{[^ ]*}} <col:16, col:18> col:3 operator() 'auto () const -> auto' inline // CHECK-NEXT: CompoundStmt + // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:4> col:4 implicit 'Ts...' + // CHECK-NEXT: FieldDecl 0x{{[^ ]*}} <col:10> col:10 implicit 'int':'int' // CHECK-NEXT: ParenListExpr 0x{{[^ ]*}} <col:4> 'NULL TYPE' // CHECK-NEXT: DeclRefExpr 0x{{[^ ]*}} <col:4> 'Ts...' lvalue ParmVar 0x{{[^ ]*}} 'a' 'Ts...' // CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:14> 'int' 12 |