Modules: Fix an assertion in DeclContext::buildLookup.
authorManman Ren <manman.ren@gmail.com>
Tue, 6 Sep 2016 18:16:54 +0000 (18:16 +0000)
committerManman Ren <manman.ren@gmail.com>
Tue, 6 Sep 2016 18:16:54 +0000 (18:16 +0000)
commitc748359c14956ae6453435a7fa7659af0b46916b
treedb4eba535c7f2a223ef2f8340c56fc5a05331266
parent4e463b4a2c34c9a98cdf408b3f57ea661209cf70
Modules: Fix an assertion in DeclContext::buildLookup.

When calling getMostRecentDecl, we can pull in more definitions from
a module. We call getPrimaryContext afterwards to make sure that
we buildLookup on a primary context.

rdar://27926200

llvm-svn: 280728
clang/lib/AST/DeclBase.cpp
clang/test/Modules/Inputs/lookup-assert/Base.h [new file with mode: 0644]
clang/test/Modules/Inputs/lookup-assert/Derive.h [new file with mode: 0644]
clang/test/Modules/Inputs/lookup-assert/H3.h [new file with mode: 0644]
clang/test/Modules/Inputs/lookup-assert/module.map [new file with mode: 0644]
clang/test/Modules/lookup-assert.m [new file with mode: 0644]