Remove the temporary fix to the RUN line that was committed in r289924.
authorAkira Hatanaka <ahatanaka@apple.com>
Fri, 16 Dec 2016 20:25:11 +0000 (20:25 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Fri, 16 Dec 2016 20:25:11 +0000 (20:25 +0000)
Also, dump the AST and run FileCheck to make sure the expected nodes are
created in the AST.

llvm-svn: 289986

clang/test/SemaTemplate/default-expr-arguments-3.cpp

index 3fd6bcd..9dc3b13 100644 (file)
@@ -1,10 +1,12 @@
-// FIXME: Remove the next line after a bit; this test used to
-// write a .ll file and that confuses the bots. The next line
-// cleans that up.
-// RUN: rm -f %S/default-expr-arguments-3.ll
-// RUN: %clang_cc1 -std=c++14 -verify %s
+// RUN: %clang_cc1 -std=c++14 -verify -ast-dump %s | FileCheck %s
 // expected-no-diagnostics
 
+// CHECK: FunctionDecl {{.*}} used func 'void (void)'
+// CHECK-NEXT: TemplateArgument type 'int'
+// CHECK: LambdaExpr {{.*}} 'class (lambda at
+// CHECK: ParmVarDecl {{.*}} used f 'enum foo' cinit
+// CHECK-NEXT: DeclRefExpr {{.*}} 'enum foo' EnumConstant {{.*}} 'a' 'enum foo'
+
 namespace PR28795 {
   template<typename T>
   void func() {
@@ -18,6 +20,12 @@ namespace PR28795 {
   }
 }
 
+// CHECK: ClassTemplateSpecializationDecl {{.*}} struct class2 definition
+// CHECK-NEXT: TemplateArgument type 'int'
+// CHECK: LambdaExpr {{.*}} 'class (lambda at
+// CHECK: ParmVarDecl {{.*}} used f 'enum foo' cinit
+// CHECK-NEXT: DeclRefExpr {{.*}} 'enum foo' EnumConstant {{.*}} 'a' 'enum foo'
+
 // Template struct case:
 template <class T> struct class2 {
   void bar() {
@@ -28,6 +36,14 @@ template <class T> struct class2 {
 
 template struct class2<int>;
 
+// CHECK: FunctionTemplateDecl {{.*}} f1
+// CHECK-NEXT: TemplateTypeParmDecl {{.*}} typename T
+// CHECK-NEXT: FunctionDecl {{.*}} f1 'void (void)'
+// CHECK: FunctionDecl {{.*}} f1 'void (void)'
+// CHECK-NEXT: TemplateArgument type 'int'
+// CHECK: ParmVarDecl {{.*}} n 'enum foo' cinit
+// CHECK-NEXT: DeclRefExpr {{.*}} 'enum foo' EnumConstant {{.*}} 'a' 'enum foo'
+
 template<typename T>
 void f1() {
   enum class foo { a, b };