<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 8, 2017 at 2:33 AM, Rafael Espindola via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rafael<br>
Date: Thu Sep  7 17:33:39 2017<br>
New Revision: 312769<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=312769&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=312769&view=rev</a><br>
Log:<br>
Update for PrintHelpMessage not calling exit.<br>
<br>
Modified:<br>
    clang-tools-extra/trunk/clang-<wbr>tidy/tool/ClangTidyMain.cpp<br>
    clang-tools-extra/trunk/<wbr>modularize/Modularize.cpp<br>
<br>
Modified: clang-tools-extra/trunk/clang-<wbr>tidy/tool/ClangTidyMain.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp?rev=312769&r1=312768&r2=312769&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/clang-tools-extra/<wbr>trunk/clang-tidy/tool/<wbr>ClangTidyMain.cpp?rev=312769&<wbr>r1=312768&r2=312769&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- clang-tools-extra/trunk/clang-<wbr>tidy/tool/ClangTidyMain.cpp (original)<br>
+++ clang-tools-extra/trunk/clang-<wbr>tidy/tool/ClangTidyMain.cpp Thu Sep  7 17:33:39 2017<br>
@@ -392,13 +392,13 @@ static int clangTidyMain(int argc, const<br>
   if (EnabledChecks.empty()) {<br>
     llvm::errs() << "Error: no checks enabled.\n";<br>
     llvm::cl::PrintHelpMessage(/*<wbr>Hidden=*/false, /*Categorized=*/true);<br>
-    return 1;<br>
+    return 0;<br>
   }<br>
<br>
   if (PathList.empty()) {<br>
     llvm::errs() << "Error: no input files specified.\n";<br>
     llvm::cl::PrintHelpMessage(/*<wbr>Hidden=*/false, /*Categorized=*/true);<br>
-    return 1;<br>
+    return 0;<br>
   }<br></blockquote><div><br></div><div>Actually, both of these should return non-zero exit code, since these code paths are executed when the command line arguments are incorrect. Or am I missing something?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
   ProfileData Profile;<br>
<br>
Modified: clang-tools-extra/trunk/<wbr>modularize/Modularize.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/Modularize.cpp?rev=312769&r1=312768&r2=312769&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/clang-tools-extra/<wbr>trunk/modularize/Modularize.<wbr>cpp?rev=312769&r1=312768&r2=<wbr>312769&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- clang-tools-extra/trunk/<wbr>modularize/Modularize.cpp (original)<br>
+++ clang-tools-extra/trunk/<wbr>modularize/Modularize.cpp Thu Sep  7 17:33:39 2017<br>
@@ -825,7 +825,7 @@ int main(int Argc, const char **Argv) {<br>
   // No go if we have no header list file.<br>
   if (ListFileNames.size() == 0) {<br>
     cl::PrintHelpMessage();<br>
-    return 1;<br>
+    return 0;<br></blockquote><div><br></div><div>IIUC, this path is also corresponds to incorrect command line arguments.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
   }<br>
<br>
   std::unique_ptr<<wbr>ModularizeUtilities> ModUtil;<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>