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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268471 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/Serialization/ASTReader.cpp 49 additions, 12 deletionslib/Serialization/ASTReader.cpp
- test/CodeCompletion/Inputs/ModuleA/module.modulemap 4 additions, 0 deletionstest/CodeCompletion/Inputs/ModuleA/module.modulemap
- test/CodeCompletion/Inputs/ModuleA/moduleA.h 1 addition, 0 deletionstest/CodeCompletion/Inputs/ModuleA/moduleA.h
- test/CodeCompletion/Inputs/import_moduleA.h 2 additions, 0 deletionstest/CodeCompletion/Inputs/import_moduleA.h
- test/CodeCompletion/pch-and-module.m 37 additions, 0 deletionstest/CodeCompletion/pch-and-module.m
- test/Modules/Inputs/module.map 2 additions, 0 deletionstest/Modules/Inputs/module.map
- test/Modules/Inputs/typo.h 6 additions, 0 deletionstest/Modules/Inputs/typo.h
- test/Modules/typo.m 8 additions, 0 deletionstest/Modules/typo.m
Loading
Please register or sign in to comment