r289986 - Remove the temporary fix to the RUN line that was committed in r289924.

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 16 12:25:12 PST 2016


Author: ahatanak
Date: Fri Dec 16 14:25:11 2016
New Revision: 289986

URL: http://llvm.org/viewvc/llvm-project?rev=289986&view=rev
Log:
Remove the temporary fix to the RUN line that was committed in r289924.

Also, dump the AST and run FileCheck to make sure the expected nodes are
created in the AST.

Modified:
    cfe/trunk/test/SemaTemplate/default-expr-arguments-3.cpp

Modified: cfe/trunk/test/SemaTemplate/default-expr-arguments-3.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/default-expr-arguments-3.cpp?rev=289986&r1=289985&r2=289986&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/default-expr-arguments-3.cpp (original)
+++ cfe/trunk/test/SemaTemplate/default-expr-arguments-3.cpp Fri Dec 16 14:25:11 2016
@@ -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 };




More information about the cfe-commits mailing list