Initialize CachedVFile with nullptr

This commit is contained in:
Mishal Shah
2016-10-14 15:29:18 -07:00
parent 3a493b212d
commit 09cbffb3e4
2 changed files with 3 additions and 3 deletions

View File

@@ -82,7 +82,7 @@ bool SourceManager::openVirtualFile(SourceLoc loc, StringRef name,
CharSourceRange range = CharSourceRange(*this, loc, end);
VirtualFiles[end.Value.getPointer()] = { range, name, lineOffset };
CachedVFile = {};
CachedVFile = {nullptr, nullptr};
return true;
}
@@ -99,7 +99,7 @@ void SourceManager::closeVirtualFile(SourceLoc end) {
#endif
return;
}
CachedVFile = {};
CachedVFile = {nullptr, nullptr};
CharSourceRange oldRange = virtualFile->Range;
virtualFile->Range = CharSourceRange(*this, virtualFile->Range.getStart(),