]> granicus.if.org Git - clang/commitdiff
Make DiagnosticIDs::getAllDiagnostics static. NFC.
authorGabor Horvath <xazax.hun@gmail.com>
Tue, 14 Nov 2017 12:14:49 +0000 (12:14 +0000)
committerGabor Horvath <xazax.hun@gmail.com>
Tue, 14 Nov 2017 12:14:49 +0000 (12:14 +0000)
Patch by: Andras Leitereg!

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318150 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticIDs.h
lib/Basic/Diagnostic.cpp
lib/Basic/DiagnosticIDs.cpp

index a62d6af744c91a2db580eda31170e9b028b9117f..43183a120bb9a099875126f6c36440765023c1e1 100644 (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.
index 47f6a139b15ab4d5d069e56320355afb20a1038d..640b42c1ca2e67f00fc6d7ca57d5c523be0a0e4e 100644 (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)
index 4f59e550ba03d217f3ca8ff22ce6df1195c58e21..5c53f35aa68f0da5928fd47b68eb43944071416d 100644 (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);