(brings code in line with diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67217
91177308-0d34-0410-b5e6-
96231b3b80d8
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.