summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-08-11 12:06:52 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-08-11 12:06:52 +0000
commit213d34330f15bbce2bc04f3fb7cfb5c91b7ae41a (patch)
treeaa7c250ab5149c6c61a49e2b3424185b4a74d93e /clang/test/Modules/Inputs
parent45d2767ca7e57e539bc81ab11c4498827e804532 (diff)
downloadbcm5719-llvm-213d34330f15bbce2bc04f3fb7cfb5c91b7ae41a.tar.gz
bcm5719-llvm-213d34330f15bbce2bc04f3fb7cfb5c91b7ae41a.zip
[modules] Set the lexical DC for dummy tag decls that refer to hidden
declarations that are made visible after the dummy is parsed and ODR verified Prior to this commit the "(getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one.")," assertion failure was triggered during semantic analysis of the dummy tag declaration that was declared in another tag declaration because its lexical context did not point to the outer tag decl. rdar://32292196 llvm-svn: 310706
Diffstat (limited to 'clang/test/Modules/Inputs')
-rw-r--r--clang/test/Modules/Inputs/innerstructredef.h6
-rw-r--r--clang/test/Modules/Inputs/module.map9
2 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/innerstructredef.h b/clang/test/Modules/Inputs/innerstructredef.h
new file mode 100644
index 00000000000..600f44e41cf
--- /dev/null
+++ b/clang/test/Modules/Inputs/innerstructredef.h
@@ -0,0 +1,6 @@
+struct Outer {
+// This definition is actually hidden since only submodule 'one' is imported.
+struct Inner {
+ int x;
+} field;
+};
diff --git a/clang/test/Modules/Inputs/module.map b/clang/test/Modules/Inputs/module.map
index 4cb3e8a0280..4788daa4316 100644
--- a/clang/test/Modules/Inputs/module.map
+++ b/clang/test/Modules/Inputs/module.map
@@ -451,3 +451,12 @@ module DebugNestedB {
module objcAtKeywordMissingEnd {
header "objcAtKeywordMissingEnd.h"
}
+
+module innerstructredef {
+ module one {
+ header "empty.h"
+ }
+ module two {
+ header "innerstructredef.h"
+ }
+}
OpenPOWER on IntegriCloud