[Tooling] Clear the PreambleSrcLocCache when preamble is discarded during reparsing
authorAlex Lorenz <arphaman@gmail.com>
Mon, 12 Mar 2018 19:36:29 +0000 (19:36 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Mon, 12 Mar 2018 19:36:29 +0000 (19:36 +0000)
commita44c432be44ee231f77b1d803eff6723215c2481
tree235ba8b340becf57abc9cfcdb84c7125a881df34
parente95ef87663eef176b818131dd5de8a08938dbe8c
[Tooling] Clear the PreambleSrcLocCache when preamble is discarded during reparsing

This ensures that diagnostics are not remapped to incorrect preamble locations after
the second reparse with a remapped header file occurs.

rdar://37502480

llvm-svn: 327322
clang/lib/Frontend/ASTUnit.cpp
clang/test/Index/Inputs/reparse-issue.h [new file with mode: 0644]
clang/test/Index/Inputs/reparse-issue.h-0 [new file with mode: 0644]
clang/test/Index/Inputs/reparse-issue.h-1 [new file with mode: 0644]
clang/test/Index/reparsed-live-issue.cpp [new file with mode: 0644]