1 // Test default argument instantiation in chained PCH.
4 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -include %s -include %s %s
7 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -chain-include %s -chain-include %s
10 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -fmodules %s -chain-include %s -chain-include %s
12 // expected-no-diagnostics
16 //===----------------------------------------------------------------------===//
19 namespace rdar23810407
{
20 template<typename T
> int f(T t
) {
21 extern T rdar23810407_variable
;
24 template<typename T
> int g(int a
= f([] {}));
27 //===----------------------------------------------------------------------===//
28 #elif not defined(HEADER2)
31 #error Header inclusion order messed up
34 //===----------------------------------------------------------------------===//
37 inline void instantiate_once() {
38 rdar23810407::g
<int>();
41 //===----------------------------------------------------------------------===//
43 //===----------------------------------------------------------------------===//
46 rdar23810407::g
<int>();
49 //===----------------------------------------------------------------------===//