[cfe-commits] r69142 - /cfe/trunk/tools/clang-cc/Warnings.cpp

Chris Lattner sabre at nondot.org
Tue Apr 14 21:51:48 PDT 2009


Author: lattner
Date: Tue Apr 14 23:51:48 2009
New Revision: 69142

URL: http://llvm.org/viewvc/llvm-project?rev=69142&view=rev
Log:
clean up error messages.

Modified:
    cfe/trunk/tools/clang-cc/Warnings.cpp

Modified: cfe/trunk/tools/clang-cc/Warnings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/Warnings.cpp?rev=69142&r1=69141&r2=69142&view=diff

==============================================================================
--- cfe/trunk/tools/clang-cc/Warnings.cpp (original)
+++ cfe/trunk/tools/clang-cc/Warnings.cpp Tue Apr 14 23:51:48 2009
@@ -125,7 +125,8 @@
                              diag::MAP_FATAL);
   Diags.setDiagnosticMapping(diag::warn_missing_prototype, diag::MAP_IGNORE);
   
-  // -fdiagnostics-show-option
+  // FIXME: -fdiagnostics-show-option
+  // FIXME: -Wfatal-errors / -Wfatal-errors=foo
 
   for (unsigned i = 0, e = OptWarnings.size(); i != e; ++i) {
     const std::string &Opt = OptWarnings[i];
@@ -158,7 +159,7 @@
       const char *Specifier = 0;
       if (OptEnd-OptStart != 5) {  // Specifier must be present.
         if (OptStart[5] != '=' || OptEnd-OptStart == 6) {
-          fprintf(stderr, "Unknown warning option: -W%s\n", Opt.c_str());
+          fprintf(stderr, "error: unknown warning option: -W%s\n", Opt.c_str());
           return true;
         }
         Specifier = OptStart+6;
@@ -180,11 +181,11 @@
                        WarningOptionCompare);
     if (Found == OptionTable + OptionTableSize ||
         strcmp(Found->Name, OptStart) != 0) {
-      fprintf(stderr, "Unknown warning option: -W%s\n", Opt.c_str());
+      fprintf(stderr, "error: unknown warning option: -W%s\n", Opt.c_str());
       return true;
     }
     
-    // Option exists.
+    // Option exists, poke all the members of its diagnostic set.
     for (unsigned i = 0, e = Found->NumMembers; i != e; ++i)
       Diags.setDiagnosticMapping(Found->Members[i], Mapping);
   }





More information about the cfe-commits mailing list