[cfe-commits] r67217 - /cfe/trunk/lib/Driver/Driver.cpp

Daniel Dunbar daniel at zuster.org
Wed Mar 18 11:03:46 PDT 2009


Author: ddunbar
Date: Wed Mar 18 13:03:46 2009
New Revision: 67217

URL: http://llvm.org/viewvc/llvm-project?rev=67217&view=rev
Log:
Driver: Don't warn about unused arguments if there are Driver errors
(brings code in line with diagnostic.

Modified:
    cfe/trunk/lib/Driver/Driver.cpp

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=67217&r1=67216&r2=67217&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Wed Mar 18 13:03:46 2009
@@ -653,11 +653,14 @@
                        II);
   }
 
-  // If there were no errors, warn about any unused arguments.
+  // If there were errors, don't warn about any unused arguments.
+  if (Diags.getNumErrors())
+    return;
+
   for (ArgList::const_iterator it = C.getArgs().begin(), ie = C.getArgs().end();
        it != ie; ++it) {
     Arg *A = *it;
-
+      
     // FIXME: It would be nice to be able to send the argument to the
     // Diagnostic, so that extra values, position, and so on could be
     // printed.





More information about the cfe-commits mailing list