summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/SourceManager.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-01-28 20:14:54 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-01-28 20:14:54 +0000
commita790e1afc27fa0643f220bb2ccb2db2534404f6f (patch)
treee4cc073a0b91295436bf3f857010792970cc4e59 /include/clang/Basic/SourceManager.h
parent6993b070322ddf4d58219bb11e647975d077d2f0 (diff)
Fix layering violation: include/clang/Basic/PlistSupport.h should not include
files from include/clang/Lex. Clean up module map. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r--include/clang/Basic/SourceManager.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 717258ddcf..d17fdd51bb 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -1057,10 +1057,16 @@ public:
getImmediateExpansionRange(SourceLocation Loc) const;
/// \brief Given a SourceLocation object, return the range of
- /// tokens covered by the expansion the ultimate file.
+ /// tokens covered by the expansion in the ultimate file.
std::pair<SourceLocation,SourceLocation>
getExpansionRange(SourceLocation Loc) const;
+ /// \brief Given a SourceRange object, return the range of
+ /// tokens covered by the expansion in the ultimate file.
+ SourceRange getExpansionRange(SourceRange Range) const {
+ return SourceRange(getExpansionRange(Range.getBegin()).first,
+ getExpansionRange(Range.getEnd()).second);
+ }
/// \brief Given a SourceLocation object, return the spelling
/// location referenced by the ID.