// 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 namespace TestInvalidRParenOnCXXUnresolvedConstructExpr { template void f(T i, T j) { return T (i, j; } } // CHECK: NamespaceDecl {{.*}} <{{.*}}> {{.*}} TestInvalidRParenOnCXXUnresolvedConstructExpr // CHECK-NEXT: `-FunctionTemplateDecl // CHECK-NEXT: |-TemplateTypeParmDecl // CHECK-NEXT: `-FunctionDecl // CHECK-NEXT: |-ParmVarDecl // CHECK-NEXT: |-ParmVarDecl // CHECK-NEXT: `-CompoundStmt // CHECK-NEXT: `-ReturnStmt // CHECK-NEXT: `-CXXUnresolvedConstructExpr {{.*}} 'T' // CHECK-NEXT: |-DeclRefExpr {{.*}} 'T' lvalue ParmVar {{.*}} 'i' 'T' // CHECK-NEXT: `-DeclRefExpr {{.*}} 'T' lvalue ParmVar {{.*}} 'j' 'T' namespace TestInvalidIf { int g(int i) { if (invalid_condition) return 4; else return i; } } // CHECK: NamespaceDecl {{.*}} <{{.*}}> {{.*}} TestInvalidIf // CHECK-NEXT: `-FunctionDecl // CHECK-NEXT: |-ParmVarDecl // CHECK-NEXT: `-CompoundStmt // CHECK-NEXT: `-IfStmt {{.*}} // CHECK-NEXT: |-OpaqueValueExpr {{.*}} <> 'bool' // CHECK-NEXT: |-ReturnStmt {{.*}} // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 4 // CHECK-NEXT: `-ReturnStmt {{.*}} // CHECK-NEXT: `-ImplicitCastExpr {{.*}} 'int' // CHECK-NEXT: `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'i' 'int' namespace TestInvalidFunctionDecl { struct Str { double foo1(double, invalid_type); }; double Str::foo1(double, invalid_type) { return 45; } } // CHECK: NamespaceDecl {{.*}} <{{.*}}> {{.*}} TestInvalidFunctionDecl // CHECK-NEXT: |-CXXRecordDecl {{.*}} line:44:8 struct Str definition // CHECK: | |-CXXRecordDecl {{.*}} col:8 implicit struct Str // CHECK-NEXT: | `-CXXMethodDecl {{.*}} col:11 invalid foo1 'double (double, int)' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:22 'double' // CHECK-NEXT: | `-ParmVarDecl {{.*}} > col:36 invalid 'int' // CHECK-NEXT: `-CXXMethodDecl {{.*}} parent {{.*}} line:47:13 invalid foo1 'double (double, int)' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:24 'double' // CHECK-NEXT: |-ParmVarDecl {{.*}} > col:38 invalid 'int' // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-ReturnStmt {{.*}} // CHECK-NEXT: `-ImplicitCastExpr {{.*}} 'double' // CHECK-NEXT: `-IntegerLiteral {{.*}} 'int' 45