[clang-tools-extra] r219409 - Small cleanups from review comments.

Manuel Klimek klimek at google.com
Thu Oct 9 06:22:46 PDT 2014


Author: klimek
Date: Thu Oct  9 08:22:46 2014
New Revision: 219409

URL: http://llvm.org/viewvc/llvm-project?rev=219409&view=rev
Log:
Small cleanups from review comments.

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=219409&r1=219408&r2=219409&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h (original)
+++ clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h Thu Oct  9 08:22:46 2014
@@ -60,13 +60,11 @@ std::string runCheckOnCode(StringRef Cod
   ArgCXX11.push_back("-std=c++11");
   ArgCXX11.insert(ArgCXX11.end(), ExtraArgs.begin(), ExtraArgs.end());
   ArgCXX11.push_back(Filename.str());
-  llvm::IntrusiveRefCntPtr<FileManager> files(
+  llvm::IntrusiveRefCntPtr<FileManager> Files(
       new FileManager(FileSystemOptions()));
   tooling::ToolInvocation Invocation(
-      ArgCXX11, new TestClangTidyAction(Check, Finder, Context), files.get());
-  SmallString<16> FileNameStorage;
-  StringRef FileNameRef = Filename.toNullTerminatedStringRef(FileNameStorage);
-  Invocation.mapVirtualFile(FileNameRef, Code);
+      ArgCXX11, new TestClangTidyAction(Check, Finder, Context), Files.get());
+  Invocation.mapVirtualFile(Filename.str(), Code);
   Invocation.setDiagnosticConsumer(&DiagConsumer);
   if (!Invocation.run())
     return "";





More information about the cfe-commits mailing list