summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/submodules-merge-defs.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-07-15 20:53:25 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-07-15 20:53:25 +0000
commit3cbf3f1f597e7ba95a2c8161d8b14a9b8a4e904b (patch)
treeb27ba22691e5c9a8acb7e8ba3ba57fa4e3405e9d /clang/test/Modules/submodules-merge-defs.cpp
parentf52a899f4aedc5770c5af0a2343bfd1e50385400 (diff)
downloadbcm5719-llvm-3cbf3f1f597e7ba95a2c8161d8b14a9b8a4e904b.tar.gz
bcm5719-llvm-3cbf3f1f597e7ba95a2c8161d8b14a9b8a4e904b.zip
Push alias-declarations and alias-template declarations into scope even if
they're redeclarations. This is necessary in order for name lookup to correctly find the most recent declaration of the name (which affects default template argument lookup and cross-module merging, among other things). llvm-svn: 275612
Diffstat (limited to 'clang/test/Modules/submodules-merge-defs.cpp')
-rw-r--r--clang/test/Modules/submodules-merge-defs.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Modules/submodules-merge-defs.cpp b/clang/test/Modules/submodules-merge-defs.cpp
index 23d1f5cfb12..4ab822a022b 100644
--- a/clang/test/Modules/submodules-merge-defs.cpp
+++ b/clang/test/Modules/submodules-merge-defs.cpp
@@ -58,6 +58,11 @@ G::A pre_ga // expected-error +{{must be imported}}
decltype(G::h) pre_gh = G::h; // expected-error +{{must be imported}}
// expected-note@defs.h:51 +{{here}}
+int pre_h = H(); // expected-error +{{must be imported}}
+// expected-note@defs.h:56 +{{here}}
+using pre_i = I<>; // expected-error +{{must be imported}}
+// expected-note@defs.h:57 +{{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}}
@@ -99,6 +104,8 @@ 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;
+int post_h = H();
+using post_i = I<>;
J<> post_j;
template<typename T, int N, template<typename> class K> struct J;
J<> post_j2;
OpenPOWER on IntegriCloud