[clang-tidy] Set current main file name in tests.

llvm-svn: 243272
This commit is contained in:
Alexander Kornienko 2015-07-27 14:54:31 +00:00
parent 669c921bfd
commit 102d2c252a
1 changed files with 1 additions and 0 deletions

View File

@ -55,6 +55,7 @@ runCheckOnCode(StringRef Code, std::vector<ClangTidyError> *Errors = nullptr,
T Check("test-check", &Context);
ast_matchers::MatchFinder Finder;
Check.registerMatchers(&Finder);
Context.setCurrentFile(Filename.str());
std::vector<std::string> ArgCXX11(1, "clang-tidy");
ArgCXX11.push_back("-fsyntax-only");