[clang-tools-extra] r204332 - ClangTidyTest.h: Don't use initializer list. msc17 doesn't recognize one.

NAKAMURA Takumi geek4civic at gmail.com
Thu Mar 20 03:52:52 PDT 2014


Author: chapuni
Date: Thu Mar 20 05:52:51 2014
New Revision: 204332

URL: http://llvm.org/viewvc/llvm-project?rev=204332&view=rev
Log:
ClangTidyTest.h: Don't use initializer list. msc17 doesn't recognize one.

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=204332&r1=204331&r2=204332&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h (original)
+++ clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h Thu Mar 20 05:52:51 2014
@@ -45,15 +45,16 @@ template <typename T> std::string runChe
   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;





More information about the cfe-commits mailing list