Increase SmallVector<> size in DiagnosticsEngine::setSeverityForGroup
In a Clang bootstrap, this vector always held 129 elements. Also switch to a range-based for loop. llvm-svn: 215360
This commit is contained in:
parent
21cf026893
commit
eb7cd664a8
|
@ -232,13 +232,13 @@ bool DiagnosticsEngine::setSeverityForGroup(diag::Flavor Flavor,
|
||||||
StringRef Group, diag::Severity Map,
|
StringRef Group, diag::Severity Map,
|
||||||
SourceLocation Loc) {
|
SourceLocation Loc) {
|
||||||
// Get the diagnostics in this group.
|
// Get the diagnostics in this group.
|
||||||
SmallVector<diag::kind, 8> GroupDiags;
|
SmallVector<diag::kind, 256> GroupDiags;
|
||||||
if (Diags->getDiagnosticsInGroup(Flavor, Group, GroupDiags))
|
if (Diags->getDiagnosticsInGroup(Flavor, Group, GroupDiags))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Set the mapping.
|
// Set the mapping.
|
||||||
for (unsigned i = 0, e = GroupDiags.size(); i != e; ++i)
|
for (diag::kind Diag : GroupDiags)
|
||||||
setSeverity(GroupDiags[i], Map, Loc);
|
setSeverity(Diag, Map, Loc);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue