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); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits