From: Akira Hatanaka Date: Fri, 16 Dec 2016 20:25:11 +0000 (+0000) Subject: Remove the temporary fix to the RUN line that was committed in r289924. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67b291aa1e26649274028b960abac7cd66230b81;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289986 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaTemplate/default-expr-arguments-3.cpp b/test/SemaTemplate/default-expr-arguments-3.cpp index 3fd6bcd1bd..9dc3b13430 100644 --- a/test/SemaTemplate/default-expr-arguments-3.cpp +++ b/test/SemaTemplate/default-expr-arguments-3.cpp @@ -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 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 struct class2 { void bar() { @@ -28,6 +36,14 @@ template struct class2 { template struct class2; +// 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 void f1() { enum class foo { a, b };