aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/SourceManager.h
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-07-29 11:12:46 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-07-29 11:12:46 +0000
commitb2efdf3e92f986956f0a755ba815f3870838583b (patch)
treefa67999a94aa12b37787b2d12482810019468d37 /include/clang/Basic/SourceManager.h
parentd22f0847a95938203fe12ab50bfc33d79c664a77 (diff)
Microoptimize isOffsetInFileID a bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160928 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r--include/clang/Basic/SourceManager.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 1496355f67..32268d789d 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -1517,13 +1517,12 @@ private:
return true;
// If it is the last local entry, then it does if the location is local.
- if (static_cast<unsigned>(FID.ID+1) == LocalSLocEntryTable.size()) {
+ if (FID.ID+1 == static_cast<int>(LocalSLocEntryTable.size()))
return SLocOffset < NextLocalOffset;
- }
// Otherwise, the entry after it has to not include it. This works for both
// local and loaded entries.
- return SLocOffset < getSLocEntry(FileID::get(FID.ID+1)).getOffset();
+ return SLocOffset < getSLocEntryByID(FID.ID+1).getOffset();
}
/// \brief Create a new fileID for the specified ContentCache and