xref: /minix3/external/bsd/llvm/dist/clang/test/SemaCXX/template-implicit-vars.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -ast-dump | FileCheck %s
2*0a6a1f1dSLionel Sambuc template<typename T>
f(T t)3*0a6a1f1dSLionel Sambuc void f(T t) {
4*0a6a1f1dSLionel Sambuc   T a[] = {t};
5*0a6a1f1dSLionel Sambuc   for (auto x : a) {}
6*0a6a1f1dSLionel Sambuc }
7*0a6a1f1dSLionel Sambuc 
g()8*0a6a1f1dSLionel Sambuc void g() {
9*0a6a1f1dSLionel Sambuc   f(1);
10*0a6a1f1dSLionel Sambuc }
11*0a6a1f1dSLionel Sambuc // CHECK: VarDecl {{.*}} implicit used __range
12*0a6a1f1dSLionel Sambuc // CHECK: VarDecl {{.*}} implicit used __range
13*0a6a1f1dSLionel Sambuc // CHECK: VarDecl {{.*}} implicit used __begin
14*0a6a1f1dSLionel Sambuc // CHECK: VarDecl {{.*}} implicit used __end
15