[cfe-commits] r103703 - /cfe/trunk/lib/Basic/Diagnostic.cpp

Chandler Carruth chandlerc at gmail.com
Thu May 13 00:43:05 PDT 2010


Author: chandlerc
Date: Thu May 13 02:43:05 2010
New Revision: 103703

URL: http://llvm.org/viewvc/llvm-project?rev=103703&view=rev
Log:
Update the types for warning option subgroup arrays to 'short', we have more
than 127 groups so this was already failing given -fsigned-char. A subsequent
to commit to TableGen will generate shorts for the arrays themselves.

Modified:
    cfe/trunk/lib/Basic/Diagnostic.cpp

Modified: cfe/trunk/lib/Basic/Diagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Diagnostic.cpp?rev=103703&r1=103702&r2=103703&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
+++ cfe/trunk/lib/Basic/Diagnostic.cpp Thu May 13 02:43:05 2010
@@ -461,7 +461,7 @@
 struct WarningOption {
   const char  *Name;
   const short *Members;
-  const char  *SubGroups;
+  const short *SubGroups;
 };
 
 #define GET_DIAG_ARRAYS
@@ -491,9 +491,9 @@
   }
 
   // Enable/disable all subgroups along with this one.
-  if (const char *SubGroups = Group->SubGroups) {
-    for (; *SubGroups != (char)-1; ++SubGroups)
-      MapGroupMembers(&OptionTable[(unsigned char)*SubGroups], Mapping, Diags);
+  if (const short *SubGroups = Group->SubGroups) {
+    for (; *SubGroups != (short)-1; ++SubGroups)
+      MapGroupMembers(&OptionTable[(short)*SubGroups], Mapping, Diags);
   }
 }
 





More information about the cfe-commits mailing list