summaryrefslogtreecommitdiffstats
path: root/clang/test/AST/template-implicit-vars.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2018-11-30 18:43:02 +0000
committerAaron Ballman <aaron@aaronballman.com>2018-11-30 18:43:02 +0000
commit4b5b0c0025c3238f7a8894ba1ac28b6f2394286a (patch)
treec4c2609ea00629f3aff56d9c8df6c9d945957a4d /clang/test/AST/template-implicit-vars.cpp
parent1901a12e765f2404b5908ab8004c5ceefa79db1f (diff)
downloadbcm5719-llvm-4b5b0c0025c3238f7a8894ba1ac28b6f2394286a.tar.gz
bcm5719-llvm-4b5b0c0025c3238f7a8894ba1ac28b6f2394286a.zip
Move AST tests into their own test directory; NFC.
This moves everything primarily testing the functionality of -ast-dump and -ast-print into their own directory, rather than leaving the tests spread around the testing directory. llvm-svn: 348017
Diffstat (limited to 'clang/test/AST/template-implicit-vars.cpp')
-rw-r--r--clang/test/AST/template-implicit-vars.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/AST/template-implicit-vars.cpp b/clang/test/AST/template-implicit-vars.cpp
new file mode 100644
index 00000000000..25d35fbdb84
--- /dev/null
+++ b/clang/test/AST/template-implicit-vars.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -ast-dump | FileCheck %s
+template<typename T>
+void f(T t) {
+ T a[] = {t};
+ for (auto x : a) {}
+}
+
+void g() {
+ f(1);
+}
+// CHECK: VarDecl {{.*}} implicit used __range
+// CHECK: VarDecl {{.*}} implicit used __range
+// CHECK: VarDecl {{.*}} implicit used __begin
+// CHECK: VarDecl {{.*}} implicit used __end
OpenPOWER on IntegriCloud