1 // RUN: not %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -fms-extensions -ast-dump -ast-dump-filter Test %s | FileCheck -check-prefix CHECK -strict-whitespace %s
2
3 namespace TestInvalidRParenOnCXXUnresolvedConstructExpr {
4 template <class T>
f(T i,T j)5 void f(T i, T j) {
6 return T (i, j;
7 }
8 }
9
10 // CHECK: NamespaceDecl {{.*}} <{{.*}}> {{.*}} TestInvalidRParenOnCXXUnresolvedConstructExpr
11 // CHECK-NEXT: `-FunctionTemplateDecl
12 // CHECK-NEXT: |-TemplateTypeParmDecl
13 // CHECK-NEXT: `-FunctionDecl
14 // CHECK-NEXT: |-ParmVarDecl
15 // CHECK-NEXT: |-ParmVarDecl
16 // CHECK-NEXT: `-CompoundStmt
17 // CHECK-NEXT: `-ReturnStmt
18 // CHECK-NEXT: `-CXXUnresolvedConstructExpr {{.*}} <col:10, col:16> 'T'
19 // CHECK-NEXT: |-DeclRefExpr {{.*}} <col:13> 'T' lvalue ParmVar {{.*}} 'i' 'T'
20 // CHECK-NEXT: `-DeclRefExpr {{.*}} <col:16> 'T' lvalue ParmVar {{.*}} 'j' 'T'
21
22
23 namespace TestInvalidIf {
24 int g(int i) {
25 if (invalid_condition)
26 return 4;
27 else
28 return i;
29 }
30 }
31 // CHECK: NamespaceDecl {{.*}} <{{.*}}> {{.*}} TestInvalidIf
32 // CHECK-NEXT: `-FunctionDecl
33 // CHECK-NEXT: |-ParmVarDecl
34 // CHECK-NEXT: `-CompoundStmt
35 // CHECK-NEXT: `-IfStmt {{.*}} <line:25:3, line:28:12>
36 // CHECK-NEXT: |-<<<NULL>>>
37 // CHECK-NEXT: |-OpaqueValueExpr {{.*}} <<invalid sloc>> '_Bool'
38 // CHECK-NEXT: |-ReturnStmt {{.*}} <line:26:5, col:12>
39 // CHECK-NEXT: | `-IntegerLiteral {{.*}} <col:12> 'int' 4
40 // CHECK-NEXT: `-ReturnStmt {{.*}} <line:28:5, col:12>
41 // CHECK-NEXT: `-ImplicitCastExpr {{.*}} <col:12> 'int' <LValueToRValue>
42 // CHECK-NEXT: `-DeclRefExpr {{.*}} <col:12> 'int' lvalue ParmVar {{.*}} 'i' 'int'
43
44