File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
clang/include/clang/Basic Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -1903,7 +1903,7 @@ class SourceManager : public RefCountedBase<SourceManager> {
19031903
19041904 FileID getFileID (SourceLocation::UIntTy SLocOffset) const {
19051905 // If our one-entry cache covers this offset, just return it.
1906- if (isOffsetInFileID (LastFileIDLookup, SLocOffset) )
1906+ if (SLocOffset >= LastLookupStartOffset && SLocOffset < LastLookupEndOffset )
19071907 return LastFileIDLookup;
19081908 return getFileIDSlow (SLocOffset);
19091909 }
@@ -1927,10 +1927,6 @@ class SourceManager : public RefCountedBase<SourceManager> {
19271927 // / specified SourceLocation offset. This is a very hot method.
19281928 inline bool isOffsetInFileID (FileID FID,
19291929 SourceLocation::UIntTy SLocOffset) const {
1930- if (FID == LastFileIDLookup)
1931- return SLocOffset >= LastLookupStartOffset &&
1932- SLocOffset < LastLookupEndOffset;
1933-
19341930 const SrcMgr::SLocEntry &Entry = getSLocEntry (FID);
19351931 // If the entry is after the offset, it can't contain it.
19361932 if (SLocOffset < Entry.getOffset ()) return false ;
You can’t perform that action at this time.
0 commit comments