1 // Test without serialization:
2 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -ast-dump %s \
5 // Test with serialization:
6 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -emit-pch -o %t %s
7 // RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -Wno-unused-value \
8 // RUN: -include-pch %t -ast-dump-all /dev/null \
11 // Make sure that the Stmt * for the body of the LambdaExpr is
12 // equal to the Stmt * for the body of the call operator.
19 // CHECK: FunctionDecl {{.*}} Test0
21 // CHECK: CXXMethodDecl {{.*}} operator() 'int () const' inline
22 // CHECK-NEXT: CompoundStmt 0x[[TMP0:.*]]
23 // CHECK: IntegerLiteral {{.*}} 'int' 42
25 // CHECK: CompoundStmt 0x[[TMP0]]
26 // Check: IntegerLiteral {{.*}} 'int' 42
29 [](auto x
) { return x
; };
32 // CHECK: FunctionDecl {{.*}} Test1
34 // CHECK: CXXMethodDecl {{.*}} operator() 'auto (auto) const' inline
35 // CHECK-NEXT: ParmVarDecl {{.*}} referenced x 'auto'
36 // CHECK-NEXT: CompoundStmt 0x[[TMP1:.*]]
37 // CHECK: DeclRefExpr {{.*}} 'x' 'auto'
39 // CHECK: CompoundStmt 0x[[TMP1]]
40 // CHECK: DeclRefExpr {{.*}} 'x' 'auto'