[clang-tools-extra] r245215 - [clang-tidy] Fix a use-after-free.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 17 04:27:11 PDT 2015


Author: alexfh
Date: Mon Aug 17 06:27:11 2015
New Revision: 245215

URL: http://llvm.org/viewvc/llvm-project?rev=245215&view=rev
Log:
[clang-tidy] Fix a use-after-free.

Modified:
    clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp

Modified: clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp?rev=245215&r1=245214&r2=245215&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp Mon Aug 17 06:27:11 2015
@@ -272,7 +272,7 @@ static int clangTidyMain(int argc, const
   StringRef FileName("dummy");
   auto PathList = OptionsParser.getSourcePathList();
   if (!PathList.empty()) {
-    FileName = OptionsParser.getSourcePathList().front();
+    FileName = PathList.front();
   }
   ClangTidyOptions EffectiveOptions = OptionsProvider->getOptions(FileName);
   std::vector<std::string> EnabledChecks = getCheckNames(EffectiveOptions);




More information about the cfe-commits mailing list