summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-06-17 23:07:50 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-06-17 23:07:50 +0000
commitebc80e4942e72d0a4ddf5f5cdd956459f01a4b2e (patch)
tree6e94836a5493e317db0f00b44eb53cf19b5de760 /test
parentd635b74650f70603940354305aeaf3b89000cd61 (diff)
downloadclang-ebc80e4942e72d0a4ddf5f5cdd956459f01a4b2e.tar.gz
[modules] Ensure that if we merge the definitions of two enumerations, that
making either of them visible makes the merged definition visible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Modules/submodules-merge-defs.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Modules/submodules-merge-defs.cpp b/test/Modules/submodules-merge-defs.cpp
index 38b3147ade..94c0fd354c 100644
--- a/test/Modules/submodules-merge-defs.cpp
+++ b/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;