aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-18 18:03:46 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-18 18:03:46 +0000
commitaf2e4baa2a75471e820030701225a1ca02c7308f (patch)
tree25a95a5fafa01301b221800c0ce5d4521d0d86a8 /lib/Driver/Driver.cpp
parent9c3b3d0987ecbe9efb16e07e81d96667d8702fae (diff)
Driver: Don't warn about unused arguments if there are Driver errors
(brings code in line with diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index d539070d5d..03138bf0ee 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -653,11 +653,14 @@ void Driver::BuildJobs(Compilation &C) const {
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.