23 lines · cpp
1// Test without serialization:2// RUN: %clang_cc1 %s -std=c++11 -ast-dump | FileCheck %s3//4// Test with serialization:5// RUN: %clang_cc1 -std=c++11 -emit-pch -o %t %s6// 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 %s9 10template<typename T>11void f(T t) {12 T a[] = {t};13 for (auto x : a) {}14}15 16void g() {17 f(1);18}19// CHECK: VarDecl {{.*}} implicit used __range20// CHECK: VarDecl {{.*}} implicit used __range21// CHECK: VarDecl {{.*}} implicit used __begin22// CHECK: VarDecl {{.*}} implicit used __end23