forked from OSchip/llvm-project
There's some code in the PCH reader that looks like it's needlessly complex, but
turns out that it's actually needed for C++ modules support. Since simplifying it didn't cause any test failures, I'll add a test for it. llvm-svn: 154582
This commit is contained in:
parent
a5f6fd9884
commit
02f75673dd
|
@ -36,6 +36,8 @@ module category_bottom {
|
|||
module category_other { header "category_other.h" }
|
||||
module redeclarations_left { header "redeclarations_left.h" }
|
||||
module redeclarations_right { header "redeclarations_right.h" }
|
||||
module redecl_namespaces_left { header "redecl_namespaces_left.h" }
|
||||
module redecl_namespaces_right { header "redecl_namespaces_right.h" }
|
||||
module load_failure { header "load_failure.h" }
|
||||
|
||||
module decldef {
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
namespace A {
|
||||
int i;
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
namespace A {
|
||||
int j;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
@__experimental_modules_import redecl_namespaces_left;
|
||||
@__experimental_modules_import redecl_namespaces_right;
|
||||
|
||||
void test() {
|
||||
A::i;
|
||||
A::j;
|
||||
A::k; // expected-error {{no member named 'k' in namespace 'A'}}
|
||||
}
|
||||
|
||||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t -emit-module -fmodule-name=redecl_namespaces_left %S/Inputs/module.map
|
||||
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t -emit-module -fmodule-name=redecl_namespaces_right %S/Inputs/module.map
|
||||
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -w %s -verify
|
Loading…
Reference in New Issue