summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/submodules-merge-defs.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-03-27 20:16:58 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-03-27 20:16:58 +0000
commit9a71c99844972bb352067d00a4d35b848238fc9d (patch)
tree47177f641af524bc225e133ebd4ce9421bf7315b /clang/test/Modules/submodules-merge-defs.cpp
parent7b57cef5b088dd87b105c293cffb5745eea008a7 (diff)
downloadbcm5719-llvm-9a71c99844972bb352067d00a4d35b848238fc9d.tar.gz
bcm5719-llvm-9a71c99844972bb352067d00a4d35b848238fc9d.zip
[modules] Allow a function to be redefined if the old definition is not visible.
llvm-svn: 233407
Diffstat (limited to 'clang/test/Modules/submodules-merge-defs.cpp')
-rw-r--r--clang/test/Modules/submodules-merge-defs.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/test/Modules/submodules-merge-defs.cpp b/clang/test/Modules/submodules-merge-defs.cpp
index cdda48ea652..86e50368a9e 100644
--- a/clang/test/Modules/submodules-merge-defs.cpp
+++ b/clang/test/Modules/submodules-merge-defs.cpp
@@ -5,7 +5,9 @@
#include "empty.h"
A pre_a; // expected-error {{must be imported}} expected-error {{must use 'struct'}}
-// expected-note@defs.h:1 {{here}}
+// expected-note@defs.h:1 +{{here}}
+// FIXME: We should warn that use_a is being used without being imported.
+int pre_use_a = use_a(pre_a); // expected-error {{'A' must be imported}}
B::Inner2 pre_bi; // expected-error +{{must be imported}}
// expected-note@defs.h:4 +{{here}}
@@ -21,13 +23,17 @@ C2 pre_c2; // expected-error +{{must be imported}} expected-error {{must use 'st
D::X pre_dx; // expected-error +{{must be imported}}
// expected-note@defs.h:18 +{{here}}
// expected-note@defs.h:19 +{{here}}
+// FIXME: We should warn that use_dx is being used without being imported.
+int pre_use_dx = use_dx(pre_dx);
// Make definitions from second module visible.
#include "import-and-redefine.h"
A post_a;
+int post_use_a = use_a(post_a);
B::Inner2 post_bi;
C_Base<1> post_cb1;
C1 c1;
C2 c2;
D::X post_dx;
+int post_use_dx = use_dx(post_dx);
OpenPOWER on IntegriCloud