Fix CodeCompletion & TypoCorrection when combining a PCH with Modules
authorBen Langmuir <blangmuir@apple.com>
Wed, 4 May 2016 00:53:13 +0000 (00:53 +0000)
committerBen Langmuir <blangmuir@apple.com>
Wed, 4 May 2016 00:53:13 +0000 (00:53 +0000)
commit537c5b5b62c42528fc90914ce6abe7002c3fb4c4
tree1d85faa427187b73edb925cd0416bc5f2f9d4c08
parent2c5aeabeddd0495dcb4b39134f3ab1e89e0d66e5
Fix CodeCompletion & TypoCorrection when combining a PCH with Modules

This commit fixes the IdentifierIterator to actually include identifiers
from a PCH or precompiled preamble when there is also a global module
index. This was causing code-completion (outside of C++) and
typo-correction to be missing global identifiers defined in the
PCH/preamble. Typo-correction has been broken since we first started
using the module index, whereas code-completion only started relying on
identifier iterator in r232793.

rdar://problem/25642879

llvm-svn: 268471
clang/lib/Serialization/ASTReader.cpp
clang/test/CodeCompletion/Inputs/ModuleA/module.modulemap [new file with mode: 0644]
clang/test/CodeCompletion/Inputs/ModuleA/moduleA.h [new file with mode: 0644]
clang/test/CodeCompletion/Inputs/import_moduleA.h [new file with mode: 0644]
clang/test/CodeCompletion/pch-and-module.m [new file with mode: 0644]
clang/test/Modules/Inputs/module.map
clang/test/Modules/Inputs/typo.h [new file with mode: 0644]
clang/test/Modules/typo.m [new file with mode: 0644]