diff options
Diffstat (limited to 'test/Modules/Inputs/redecl-add-after-load-decls.h')
-rw-r--r-- | test/Modules/Inputs/redecl-add-after-load-decls.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Modules/Inputs/redecl-add-after-load-decls.h b/test/Modules/Inputs/redecl-add-after-load-decls.h new file mode 100644 index 000000000000..fbe6b9387a17 --- /dev/null +++ b/test/Modules/Inputs/redecl-add-after-load-decls.h @@ -0,0 +1,24 @@ +typedef struct A B; +extern const int variable; +extern constexpr int function(); +constexpr int test(bool b) { return b ? variable : function(); } + +namespace N { + typedef struct A B; + extern const int variable; + extern constexpr int function(); +} +typedef N::B NB; +constexpr int N_test(bool b) { return b ? N::variable : N::function(); } + +@import redecl_add_after_load_top; +typedef C::A CB; +constexpr int C_test(bool b) { return b ? C::variable : C::function(); } + +struct D { + struct A; // expected-note {{forward}} + static const int variable; + static constexpr int function(); // expected-note {{here}} +}; +typedef D::A DB; +constexpr int D_test(bool b) { return b ? D::variable : D::function(); } // expected-note {{subexpression}} expected-note {{undefined}} |