Make DiagnosticIDs::getAllDiagnostics static. NFC.

Patch by: Andras Leitereg!

Differential Revision: https://reviews.llvm.org/D39372

llvm-svn: 318150
This commit is contained in:
Gabor Horvath 2017-11-14 12:14:49 +00:00
parent 848581cadb
commit 328d3afc3b
3 changed files with 4 additions and 4 deletions

View File

@ -296,8 +296,8 @@ public:
SmallVectorImpl<diag::kind> &Diags) const;
/// \brief Get the set of all diagnostic IDs.
void getAllDiagnostics(diag::Flavor Flavor,
SmallVectorImpl<diag::kind> &Diags) const;
static void getAllDiagnostics(diag::Flavor Flavor,
SmallVectorImpl<diag::kind> &Diags);
/// \brief Get the diagnostic option with the closest edit distance to the
/// given group name.

View File

@ -364,7 +364,7 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor,
SourceLocation Loc) {
// Get all the diagnostics.
SmallVector<diag::kind, 64> AllDiags;
Diags->getAllDiagnostics(Flavor, AllDiags);
DiagnosticIDs::getAllDiagnostics(Flavor, AllDiags);
// Set the mapping.
for (diag::kind Diag : AllDiags)

View File

@ -583,7 +583,7 @@ DiagnosticIDs::getDiagnosticsInGroup(diag::Flavor Flavor, StringRef Group,
}
void DiagnosticIDs::getAllDiagnostics(diag::Flavor Flavor,
SmallVectorImpl<diag::kind> &Diags) const {
SmallVectorImpl<diag::kind> &Diags) {
for (unsigned i = 0; i != StaticDiagInfoSize; ++i)
if (StaticDiagInfo[i].getFlavor() == Flavor)
Diags.push_back(StaticDiagInfo[i].DiagID);