[clang-tidy] Revert D31406 (Reuse FileID in getLocation)
authorChih-Hung Hsieh <chh@google.com>
Fri, 31 Mar 2017 01:11:11 +0000 (01:11 +0000)
committerChih-Hung Hsieh <chh@google.com>
Fri, 31 Mar 2017 01:11:11 +0000 (01:11 +0000)
Somehow the change failed test clang-tidy/llvm-include-order.cpp
on Windows platform.

Differential Revision: http://reviews.llvm.org/D31406

llvm-svn: 299146

clang-tools-extra/clang-tidy/ClangTidy.cpp

index 6ed8306..2da9e14 100644 (file)
@@ -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);
   }