diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-06-17 23:07:50 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-06-17 23:07:50 +0000 |
commit | 75ea855fd7d4720ca07a0a52d10113593bff17db (patch) | |
tree | 5720ef3a5c5375cb78cba556cde6a3d817acd103 /clang/test/Modules/submodules-merge-defs.cpp | |
parent | 546cfe8f93e67e95017b15f43f2906bc99a9b7be (diff) | |
download | bcm5719-llvm-75ea855fd7d4720ca07a0a52d10113593bff17db.tar.gz bcm5719-llvm-75ea855fd7d4720ca07a0a52d10113593bff17db.zip |
[modules] Ensure that if we merge the definitions of two enumerations, that
making either of them visible makes the merged definition visible.
llvm-svn: 239969
Diffstat (limited to 'clang/test/Modules/submodules-merge-defs.cpp')
-rw-r--r-- | clang/test/Modules/submodules-merge-defs.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Modules/submodules-merge-defs.cpp b/clang/test/Modules/submodules-merge-defs.cpp index 38b3147adec..94c0fd354c9 100644 --- a/clang/test/Modules/submodules-merge-defs.cpp +++ b/clang/test/Modules/submodules-merge-defs.cpp @@ -48,6 +48,13 @@ int pre_ff = F<int>().f(); // expected-error +{{must be imported}} int pre_fg = F<int>().g<int>(); // expected-error +{{must be imported}} // expected-note@defs.h:26 +{{here}} +G::A pre_ga // expected-error +{{must be imported}} + = G::a; // expected-error +{{must be imported}} +// expected-note@defs.h:40 +{{here}} +// expected-note@defs.h:41 +{{here}} +decltype(G::h) pre_gh = G::h; // expected-error +{{must be imported}} +// expected-note@defs.h:42 +{{here}} + J<> pre_j; // expected-error {{declaration of 'J' must be imported}} #ifdef IMPORT_USE_2 // expected-error-re@-2 {{default argument of 'J' must be imported from one of {{.*}}stuff.use{{.*}}stuff.use-2}} @@ -78,6 +85,8 @@ int post_use_dx = use_dx(post_dx); int post_e = E(0); int post_ff = F<char>().f(); int post_fg = F<char>().g<int>(); +G::A post_ga = G::a; +decltype(G::h) post_gh = G::h; J<> post_j; template<typename T, int N, template<typename> class K> struct J; J<> post_j2; |