[PCH] After deserializing a DeclContext, if it has external lexical decls but not
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 21 Sep 2012 01:30:00 +0000 (01:30 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 21 Sep 2012 01:30:00 +0000 (01:30 +0000)
commit6fa1682368f192f7148392d3136455664aab2f1b
treee879257299ba3539c45c1feb030e5b49462a0457
parent1a38004c1b3f13ad79af443226bf67b2f8d286d2
[PCH] After deserializing a DeclContext, if it has external lexical decls but not
external visible decls, call DeclContext::setMustBuildLookupTable so that the
"lazy decls" bit of the LookupPtr is set.

Previously, in non-C++, if there were no new declarations causing the "lazy decls" bit
to be set, then DeclContext::lookups_begin() would fail to return the decls from the PCH.

Fixes rdar://12316296.

llvm-svn: 164351
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/test/Index/rdar12316296-codecompletion.m [new file with mode: 0644]