Check file is C_User before hitting disk. Thanks, Vassil!

This commit is contained in:
Axel Naumann 2018-06-26 09:43:15 +02:00 committed by sftnight
parent 18bd806414
commit ee37473807

View File

@ -239,6 +239,10 @@ namespace cling {
return false;
SourceManager& SM = m_Interp->getSema().getSourceManager();
auto Characteristic = SM.getFileCharacteristic(Loc);
if (Characteristic != clang::SrcMgr::C_User)
return false;
auto FID = SM.getFileID(Loc);
if (FID.isInvalid())
return false;