Skip to content

Commit dd8f20d

Browse files
committed
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. llvm-svn: 103703
1 parent 449df96 commit dd8f20d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/lib/Basic/Diagnostic.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ Diagnostic::getDiagnosticLevel(unsigned DiagID, unsigned DiagClass) const {
461461
struct WarningOption {
462462
const char *Name;
463463
const short *Members;
464-
const char *SubGroups;
464+
const short *SubGroups;
465465
};
466466

467467
#define GET_DIAG_ARRAYS
@@ -491,9 +491,9 @@ static void MapGroupMembers(const WarningOption *Group, diag::Mapping Mapping,
491491
}
492492

493493
// Enable/disable all subgroups along with this one.
494-
if (const char *SubGroups = Group->SubGroups) {
495-
for (; *SubGroups != (char)-1; ++SubGroups)
496-
MapGroupMembers(&OptionTable[(unsigned char)*SubGroups], Mapping, Diags);
494+
if (const short *SubGroups = Group->SubGroups) {
495+
for (; *SubGroups != (short)-1; ++SubGroups)
496+
MapGroupMembers(&OptionTable[(short)*SubGroups], Mapping, Diags);
497497
}
498498
}
499499

0 commit comments

Comments
 (0)