diff options
Diffstat (limited to 'clang/test/Modules/Inputs')
-rw-r--r-- | clang/test/Modules/Inputs/module.map | 2 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/redecl-add-after-load.h | 23 |
2 files changed, 25 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/module.map b/clang/test/Modules/Inputs/module.map index d6effcf0ad0..061abbd24d5 100644 --- a/clang/test/Modules/Inputs/module.map +++ b/clang/test/Modules/Inputs/module.map @@ -69,6 +69,8 @@ module redeclarations_left { header "redeclarations_left.h" } module redeclarations_right { header "redeclarations_right.h" } module redecl_namespaces_left { header "redecl_namespaces_left.h" } module redecl_namespaces_right { header "redecl_namespaces_right.h" } +module redecl_add_after_load_top { header "redecl-add-after-load-top.h" } +module redecl_add_after_load { header "redecl-add-after-load.h" } module load_failure { header "load_failure.h" } module decldef { diff --git a/clang/test/Modules/Inputs/redecl-add-after-load.h b/clang/test/Modules/Inputs/redecl-add-after-load.h new file mode 100644 index 00000000000..6951a76289f --- /dev/null +++ b/clang/test/Modules/Inputs/redecl-add-after-load.h @@ -0,0 +1,23 @@ +struct A {}; +extern const int variable = 0; +extern constexpr int function() { return 0; } + +namespace N { + struct A {}; + extern const int variable = 0; + extern constexpr int function() { return 0; } +} + +@import redecl_add_after_load_top; +struct C::A {}; +const int C::variable = 0; +constexpr int C::function() { return 0; } + +struct D { + struct A; + static const int variable; + static constexpr int function(); +}; +struct D::A {}; +const int D::variable = 0; +constexpr int D::function() { return 0; } |