diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-11-12 21:55:58 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-11-12 21:55:58 +0000 |
commit | 5e3fb7616dda7343676f9f06677efaa56de115d4 (patch) | |
tree | 5ed2d0b4a764551af20050f66ba2ddd2736c9779 /clang/test/Modules/submodules-merge-defs.cpp | |
parent | 0967c91e0cb6d57a3b5eabe4d671b0961f05ca18 (diff) | |
download | bcm5719-llvm-5e3fb7616dda7343676f9f06677efaa56de115d4.tar.gz bcm5719-llvm-5e3fb7616dda7343676f9f06677efaa56de115d4.zip |
Revert r240335.
This failed to solve the problem it was aimed at, and introduced just as many
issues as it resolved. Realistically, we need to deal with the possibility that
multiple modules might define different internal linkage symbols with the same
name, and this isn't a problem unless two such symbols are simultaneously
visible.
The case where two modules define equivalent internal linkage symbols is
handled by r252063: if lookup finds multiple sufficiently-similar entities from
different modules, we just pick one of them as an extension (but we keep them
separate).
llvm-svn: 252957
Diffstat (limited to 'clang/test/Modules/submodules-merge-defs.cpp')
-rw-r--r-- | clang/test/Modules/submodules-merge-defs.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/Modules/submodules-merge-defs.cpp b/clang/test/Modules/submodules-merge-defs.cpp index 6a46e6dfa8a..bb8e69367ca 100644 --- a/clang/test/Modules/submodules-merge-defs.cpp +++ b/clang/test/Modules/submodules-merge-defs.cpp @@ -3,7 +3,7 @@ // RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery // RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -DTEXTUAL // RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -DTEXTUAL -DEARLY_INDIRECT_INCLUDE -fno-modules-hide-internal-linkage +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -DTEXTUAL -DEARLY_INDIRECT_INCLUDE // RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -fmodule-feature use_defs_twice -DIMPORT_USE_2 // Trigger import of definitions, but don't make them visible. @@ -111,4 +111,9 @@ MergeFunctionTemplateSpecializations::X<int>::Q<char> xiqc; #ifdef TEXTUAL #include "use-defs.h" void use_static_inline() { StaticInline::g({}); } +#ifdef EARLY_INDIRECT_INCLUDE +// expected-warning@-2 {{ambiguous use of internal linkage declaration 'g' defined in multiple modules}} +// expected-note@defs.h:71 {{declared here in module 'redef'}} +// expected-note@defs.h:71 {{declared here in module 'stuff.use'}} +#endif #endif |