[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / AST / template-implicit-vars.cpp
blobfb3e45d77e05bc7f3bae444ae2eed5870adf6f7f
1 // Test without serialization:
2 // RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -ast-dump | FileCheck %s
3 //
4 // Test with serialization:
5 // RUN: %clang_cc1 -std=c++11 -emit-pch -o %t %s
6 // RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -ast-dump-all /dev/null \
7 // RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
8 // RUN: | FileCheck %s
10 template<typename T>
11 void f(T t) {
12 T a[] = {t};
13 for (auto x : a) {}
16 void g() {
17 f(1);
19 // CHECK: VarDecl {{.*}} implicit used __range
20 // CHECK: VarDecl {{.*}} implicit used __range
21 // CHECK: VarDecl {{.*}} implicit used __begin
22 // CHECK: VarDecl {{.*}} implicit used __end