[clang-tools-extra] r243272 - [clang-tidy] Set current main file name in tests.
Alexander Kornienko
alexfh at google.com
Mon Jul 27 07:54:31 PDT 2015
Author: alexfh
Date: Mon Jul 27 09:54:31 2015
New Revision: 243272
URL: http://llvm.org/viewvc/llvm-project?rev=243272&view=rev
Log:
[clang-tidy] Set current main file name in tests.
Modified:
clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h
Modified: clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h?rev=243272&r1=243271&r2=243272&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h (original)
+++ clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h Mon Jul 27 09:54:31 2015
@@ -55,6 +55,7 @@ runCheckOnCode(StringRef Code, std::vect
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");
More information about the cfe-commits
mailing list