summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
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/lib/Sema/SemaDecl.cpp
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/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index d19ace9c43b..86c367097f7 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -13722,6 +13722,7 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
// comparison.
SkipBody->CheckSameAsPrevious = true;
SkipBody->New = createTagFromNewDecl();
+ SkipBody->New->setLexicalDeclContext(CurContext);
SkipBody->Previous = Hidden;
} else {
SkipBody->ShouldSkip = true;
OpenPOWER on IntegriCloud