ClangTidyTest.h: Don't use initializer list. msc17 doesn't recognize one.

llvm-svn: 204332
This commit is contained in:
NAKAMURA Takumi 2014-03-20 10:52:51 +00:00
parent 04969e8b31
commit f5cebd2f64
1 changed files with 3 additions and 2 deletions

View File

@ -45,15 +45,16 @@ template <typename T> std::string runCheckOnCode(StringRef Code) {
ClangTidyContext Context(&Errors, ".*", "");
ClangTidyDiagnosticConsumer DiagConsumer(Context);
Check.setContext(&Context);
std::vector<std::string> ArgCXX11(1, "-std=c++11");
if (!tooling::runToolOnCodeWithArgs(new TestPPAction(Check, &Context), Code,
{"-std=c++11"}))
ArgCXX11))
return "";
ast_matchers::MatchFinder Finder;
Check.registerMatchers(&Finder);
std::unique_ptr<tooling::FrontendActionFactory> Factory(
tooling::newFrontendActionFactory(&Finder));
if (!tooling::runToolOnCodeWithArgs(Factory->create(), Code, {"-std=c++11"}))
if (!tooling::runToolOnCodeWithArgs(Factory->create(), Code, ArgCXX11))
return "";
DiagConsumer.finish();
tooling::Replacements Fixes;