[PATCH] D31406: [clang-tidy] Reuse FileID in getLocation
Chih-Hung Hsieh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 30 15:21:40 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL299119: [clang-tidy] Reuse FileID in getLocation (authored by chh).
Changed prior to commit:
https://reviews.llvm.org/D31406?vs=93499&id=93554#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31406
Files:
clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp
Index: clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp
===================================================================
--- clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp
+++ clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp
@@ -238,7 +238,7 @@
return SourceLocation();
const FileEntry *File = SourceMgr.getFileManager().getFile(FilePath);
- FileID ID = SourceMgr.createFileID(File, SourceLocation(), SrcMgr::C_User);
+ FileID ID = SourceMgr.getOrCreateFileID(File, SrcMgr::C_User);
return SourceMgr.getLocForStartOfFile(ID).getLocWithOffset(Offset);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31406.93554.patch
Type: text/x-patch
Size: 588 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170330/a7d287f4/attachment.bin>
More information about the llvm-commits
mailing list