aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/SourceLocation.h1
-rw-r--r--include/clang/Lex/Lexer.h6
2 files changed, 4 insertions, 3 deletions
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h
index 154148c16b..5854639914 100644
--- a/include/clang/Basic/SourceLocation.h
+++ b/include/clang/Basic/SourceLocation.h
@@ -245,6 +245,7 @@ public:
/// the last token. Return false if the end of this range specifies the last
/// character in the range.
bool isTokenRange() const { return IsTokenRange; }
+ bool isCharRange() const { return !IsTokenRange; }
SourceLocation getBegin() const { return Range.getBegin(); }
SourceLocation getEnd() const { return Range.getEnd(); }
diff --git a/include/clang/Lex/Lexer.h b/include/clang/Lex/Lexer.h
index a935718e6f..bad9844f66 100644
--- a/include/clang/Lex/Lexer.h
+++ b/include/clang/Lex/Lexer.h
@@ -331,11 +331,11 @@ public:
const LangOptions &LangOpts,
SourceLocation *MacroEnd = 0);
- /// \brief Accepts a token source range and returns a character range with
- /// file locations.
+ /// \brief Accepts a range and returns a character range with file locations.
+ ///
/// Returns a null range if a part of the range resides inside a macro
/// expansion or the range does not reside on the same FileID.
- static CharSourceRange makeFileCharRange(SourceRange TokenRange,
+ static CharSourceRange makeFileCharRange(CharSourceRange Range,
const SourceManager &SM,
const LangOptions &LangOpts);