[Modules] Don't infinite recurse on implicit import of circular modules in preamble
Update the Preprocessor's VisibleModuleSet when typo-correction creates an implicit module import so that we won't accidentally write an invalid SourceLocation into the preamble AST. This would later lead to infinite recursion when loading the preamble AST because we use the value in ImportLocs to prevent visiting a module twice. rdar://problem/24440990 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260543 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/Basic/Module.cpp 1 addition, 0 deletionslib/Basic/Module.cpp
- lib/Serialization/ASTReader.cpp 3 additions, 1 deletionlib/Serialization/ASTReader.cpp
- test/Index/Inputs/module.map 14 additions, 0 deletionstest/Index/Inputs/module.map
- test/Index/Inputs/preamble-with-implicit-import-A.h 1 addition, 0 deletionstest/Index/Inputs/preamble-with-implicit-import-A.h
- test/Index/Inputs/preamble-with-implicit-import-B.h 3 additions, 0 deletionstest/Index/Inputs/preamble-with-implicit-import-B.h
- test/Index/Inputs/preamble-with-implicit-import-C.h 2 additions, 0 deletionstest/Index/Inputs/preamble-with-implicit-import-C.h
- test/Index/Inputs/preamble-with-implicit-import.h 4 additions, 0 deletionstest/Index/Inputs/preamble-with-implicit-import.h
- test/Index/preamble-with-implicit-import.m 6 additions, 0 deletionstest/Index/preamble-with-implicit-import.m
Loading
Please register or sign in to comment