diff options
-rw-r--r-- | include/clang/Basic/SourceManager.h | 9 | ||||
-rw-r--r-- | lib/Lex/TokenLexer.cpp | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 8e4f9ed1c5..487249560c 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -1075,21 +1075,20 @@ public: /// \brief Determines the order of 2 source locations in the "source location /// address space". - bool isBeforeInSourceLocationOffset(SourceLocation LHS, - SourceLocation RHS) const { - return isBeforeInSourceLocationOffset(LHS, RHS.getOffset()); + bool isBeforeInSLocAddrSpace(SourceLocation LHS, SourceLocation RHS) const { + return isBeforeInSLocAddrSpace(LHS, RHS.getOffset()); } /// \brief Determines the order of a source location and a source location /// offset in the "source location address space". /// /// Note that we always consider source locations loaded from - bool isBeforeInSourceLocationOffset(SourceLocation LHS, unsigned RHS) const { + bool isBeforeInSLocAddrSpace(SourceLocation LHS, unsigned RHS) const { unsigned LHSOffset = LHS.getOffset(); bool LHSLoaded = LHSOffset >= CurrentLoadedOffset; bool RHSLoaded = RHS >= CurrentLoadedOffset; if (LHSLoaded == RHSLoaded) - return LHS.getOffset() < RHS; + return LHSOffset < RHS; return LHSLoaded; } diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp index 3dcba98bea..66712e827d 100644 --- a/lib/Lex/TokenLexer.cpp +++ b/lib/Lex/TokenLexer.cpp @@ -397,8 +397,7 @@ void TokenLexer::Lex(Token &Tok) { // that captures all of this. if (ExpandLocStart.isValid() && // Don't do this for token streams. // Check that the token's location was not already set properly. - SM.isBeforeInSourceLocationOffset(Tok.getLocation(), - MacroStartSLocOffset)) { + SM.isBeforeInSLocAddrSpace(Tok.getLocation(), MacroStartSLocOffset)) { SourceLocation instLoc; if (Tok.is(tok::comment)) { instLoc = SM.createExpansionLoc(Tok.getLocation(), |