2020-06-21 20:49:27 +08:00
|
|
|
// Test without serialization:
|
2014-05-28 05:29:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -ast-dump | FileCheck %s
|
2020-06-21 20:49:27 +08:00
|
|
|
//
|
|
|
|
// Test with serialization:
|
|
|
|
// RUN: %clang_cc1 -std=c++11 -emit-pch -o %t %s
|
|
|
|
// RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -ast-dump-all /dev/null \
|
|
|
|
// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
|
|
|
|
// RUN: | FileCheck %s
|
|
|
|
|
2014-05-28 05:29:22 +08:00
|
|
|
template<typename T>
|
|
|
|
void f(T t) {
|
|
|
|
T a[] = {t};
|
|
|
|
for (auto x : a) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
void g() {
|
|
|
|
f(1);
|
|
|
|
}
|
2014-06-13 10:24:47 +08:00
|
|
|
// CHECK: VarDecl {{.*}} implicit used __range
|
|
|
|
// CHECK: VarDecl {{.*}} implicit used __range
|
|
|
|
// CHECK: VarDecl {{.*}} implicit used __begin
|
|
|
|
// CHECK: VarDecl {{.*}} implicit used __end
|