diff options
Diffstat (limited to 'test/SemaCXX/template-implicit-vars.cpp')
-rw-r--r-- | test/SemaCXX/template-implicit-vars.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/template-implicit-vars.cpp b/test/SemaCXX/template-implicit-vars.cpp new file mode 100644 index 0000000..25d35fb --- /dev/null +++ b/test/SemaCXX/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 |