[clang-tools-extra] r299146 - [clang-tidy] Revert D31406 (Reuse FileID in getLocation)
Chih-Hung Hsieh via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 30 18:11:11 PDT 2017
Author: chh
Date: Thu Mar 30 20:11:11 2017
New Revision: 299146
URL: http://llvm.org/viewvc/llvm-project?rev=299146&view=rev
Log:
[clang-tidy] Revert D31406 (Reuse FileID in getLocation)
Somehow the change failed test clang-tidy/llvm-include-order.cpp
on Windows platform.
Differential Revision: http://reviews.llvm.org/D31406
Modified:
clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp
Modified: clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp?rev=299146&r1=299145&r2=299146&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp Thu Mar 30 20:11:11 2017
@@ -238,7 +238,7 @@ private:
return SourceLocation();
const FileEntry *File = SourceMgr.getFileManager().getFile(FilePath);
- FileID ID = SourceMgr.getOrCreateFileID(File, SrcMgr::C_User);
+ FileID ID = SourceMgr.createFileID(File, SourceLocation(), SrcMgr::C_User);
return SourceMgr.getLocForStartOfFile(ID).getLocWithOffset(Offset);
}
More information about the cfe-commits
mailing list