[clang-tidy] Reuse FileID in getLocation
authorChih-Hung Hsieh <chh@google.com>
Thu, 30 Mar 2017 22:09:17 +0000 (22:09 +0000)
committerChih-Hung Hsieh <chh@google.com>
Thu, 30 Mar 2017 22:09:17 +0000 (22:09 +0000)
commit4c2647bc2aa83af9add80c23419501886231d62d
tree30bba63b2c7fd05ea66af5fbc21c215b1654b4db
parentbfd7c38de785fcbd52adf4f93eff8ec346f8b1bc
[clang-tidy] Reuse FileID in getLocation

One FileID per warning will increase and overflow NextLocalOffset
when input file is large with many warnings.
Reusing FileID avoids this problem.

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

llvm-svn: 299119
clang-tools-extra/clang-tidy/ClangTidy.cpp