[cfe-commits] r156938 - in /cfe/trunk: lib/Frontend/Warnings.cpp test/Driver/warning-options.cpp

Chad Rosier mcrosier at apple.com
Wed May 16 12:42:04 PDT 2012


Author: mcrosier
Date: Wed May 16 14:42:03 2012
New Revision: 156938

URL: http://llvm.org/viewvc/llvm-project?rev=156938&view=rev
Log:
Tweek r156937 a bit so that the suggestions are correct.

Modified:
    cfe/trunk/lib/Frontend/Warnings.cpp
    cfe/trunk/test/Driver/warning-options.cpp

Modified: cfe/trunk/lib/Frontend/Warnings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Warnings.cpp?rev=156938&r1=156937&r2=156938&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Warnings.cpp (original)
+++ cfe/trunk/lib/Frontend/Warnings.cpp Wed May 16 14:42:03 2012
@@ -183,7 +183,8 @@
       
       if (Report) {
         if (DiagIDs->getDiagnosticsInGroup(Opt, _Diags))
-          EmitUnknownDiagWarning(Diags, "-W", OrigOpt, isPositive);
+          EmitUnknownDiagWarning(Diags, isPositive ? "-W" : "-Wno-", Opt,
+                                 isPositive);
       } else {
         Diags.setDiagnosticGroupMapping(Opt, Mapping);
       }

Modified: cfe/trunk/test/Driver/warning-options.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/warning-options.cpp?rev=156938&r1=156937&r2=156938&view=diff
==============================================================================
--- cfe/trunk/test/Driver/warning-options.cpp (original)
+++ cfe/trunk/test/Driver/warning-options.cpp Wed May 16 14:42:03 2012
@@ -7,4 +7,4 @@
 // RUN:        -Wno-unused-command-line-argument %s 2>&1 | FileCheck %s
 // CHECK: unknown warning option '-Wmonkey'
 // CHECK: unknown warning option '-Wno-monkey'
-// CHECK: unknown warning option '-Wno-unused-command-line-arguments'
+// CHECK: unknown warning option '-Wno-unused-command-line-arguments'; did you mean '-Wno-unused-command-line-argument'?





More information about the cfe-commits mailing list