diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-08-23 21:02:45 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-08-23 21:02:45 +0000 |
commit | d7cb46c316808169679a8d72c69f02a1e55d78a8 (patch) | |
tree | 6493768332cfec0ab36ad4f0240b477c29fbf123 /include/clang/Basic/SourceManager.h | |
parent | b6c465e17ec37390667223a18a340e8652c212ff (diff) |
Remove one SourceManager::isInFileID overload and use isOffsetInFileID for the other.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 79eba4f353..0299d2237f 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -1017,15 +1017,15 @@ public: /// of FileID) to \arg relativeOffset. bool isInFileID(SourceLocation Loc, FileID FID, unsigned *RelativeOffset = 0) const { - return isInFileID(Loc, FID, 0, getFileIDSize(FID), RelativeOffset); - } + unsigned Offs = Loc.getOffset(); + if (isOffsetInFileID(FID, Offs)) { + if (RelativeOffset) + *RelativeOffset = Offs - getSLocEntry(FID).getOffset(); + return true; + } - /// \brief Given a specific chunk of a FileID (FileID with offset+length), - /// returns true if \arg Loc is inside that chunk and sets relative offset - /// (offset of \arg Loc from beginning of chunk) to \arg relativeOffset. - bool isInFileID(SourceLocation Loc, - FileID FID, unsigned offset, unsigned length, - unsigned *relativeOffset = 0) const; + return false; + } //===--------------------------------------------------------------------===// // Line Table Manipulation Routines |