2 // RUN: %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11
3 // RUN: %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 -DIMPORT_DECLS
5 // expected-no-diagnostics
8 @import redecl_add_after_load_decls;
11 extern const int variable;
12 extern constexpr int function();
13 constexpr int test(bool b) { return b ? variable : function(); }
17 extern const int variable;
18 extern constexpr int function();
21 constexpr int N_test(bool b) { return b ? N::variable : N::function(); }
23 @import redecl_add_after_load_top;
25 constexpr int C_test(bool b) { return b ? C::variable : C::function(); }
29 static const int variable;
30 static constexpr int function();
33 constexpr int D_test(bool b) { return b ? D::variable : D::function(); }
36 @import redecl_add_after_load;
39 constexpr int tu_variable_test = test(true);
40 constexpr int tu_function_test = test(false);
43 constexpr int ns_variable_test = N_test(true);
44 constexpr int ns_function_test = N_test(false);
46 CB struct_struct_test;
47 constexpr int struct_variable_test = C_test(true);
48 constexpr int struct_function_test = C_test(false);
50 DB merged_struct_struct_test;
51 constexpr int merged_struct_variable_test = D_test(true);
52 constexpr int merged_struct_function_test = D_test(false);