diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-19 20:40:19 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-19 20:40:19 +0000 |
commit | a64ccefdf0ea4e03ec88805d71b0af74950c7472 (patch) | |
tree | b7cf762366eafda54454929b2c40a19f48a33e41 /include | |
parent | 5a4374812c56aa60672e291b07e14d3696bbb5a6 (diff) |
Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.
It already works (and is useful with) macro locs as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Basic/SourceLocation.h | 9 | ||||
-rw-r--r-- | include/clang/Serialization/ASTReader.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h index 51734ef748..154148c16b 100644 --- a/include/clang/Basic/SourceLocation.h +++ b/include/clang/Basic/SourceLocation.h @@ -125,11 +125,10 @@ private: } public: - /// getFileLocWithOffset - Return a source location with the specified offset - /// from this file SourceLocation. - SourceLocation getFileLocWithOffset(int Offset) const { - assert(((getOffset()+Offset) & MacroIDBit) == 0 && - "offset overflow or macro loc"); + /// \brief Return a source location with the specified offset from this + /// SourceLocation. + SourceLocation getLocWithOffset(int Offset) const { + assert(((getOffset()+Offset) & MacroIDBit) == 0 && "offset overflow"); SourceLocation L; L.ID = ID+Offset; return L; diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 1a4603d53a..cc5c1d76e0 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -1147,7 +1147,7 @@ public: assert(Module.SLocRemap.find(Loc.getOffset()) != Module.SLocRemap.end() && "Cannot find offset to remap."); int Remap = Module.SLocRemap.find(Loc.getOffset())->second; - return Loc.getFileLocWithOffset(Remap); + return Loc.getLocWithOffset(Remap); } /// \brief Read a source location. |