1 // Test this without pch, template will be instantiated.
2 // RUN: %clang_cc1 -fsyntax-only %s -verify=expected
4 // Test with pch, template will be instantiated in the TU.
5 // RUN: %clang_cc1 -emit-pch -o %t %s -verify=ok
6 // RUN: %clang_cc1 -include-pch %t -fsyntax-only %s -verify=expected
8 // Test with pch with template instantiation in the pch.
9 // RUN: %clang_cc1 -emit-pch -fpch-instantiate-templates -o %t %s -verify=expected
18 T
foo() const { return "test"; } // @18
21 double bar(A
<double> *a
) {
22 return a
->foo(); // @22
27 // expected-error@18 {{cannot initialize return object}}
28 // expected-note@22 {{in instantiation of member function}}