[PATCH] D39372: Make DiagnosticIDs::getAllDiagnostics static.

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 14 04:17:31 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL318150: Make DiagnosticIDs::getAllDiagnostics static. NFC. (authored by xazax).

Changed prior to commit:
  https://reviews.llvm.org/D39372?vs=121104&id=122822#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D39372

Files:
  cfe/trunk/include/clang/Basic/DiagnosticIDs.h
  cfe/trunk/lib/Basic/Diagnostic.cpp
  cfe/trunk/lib/Basic/DiagnosticIDs.cpp


Index: cfe/trunk/include/clang/Basic/DiagnosticIDs.h
===================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticIDs.h
+++ cfe/trunk/include/clang/Basic/DiagnosticIDs.h
@@ -296,8 +296,8 @@
                              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: cfe/trunk/lib/Basic/Diagnostic.cpp
===================================================================
--- cfe/trunk/lib/Basic/Diagnostic.cpp
+++ cfe/trunk/lib/Basic/Diagnostic.cpp
@@ -364,7 +364,7 @@
                                           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: cfe/trunk/lib/Basic/DiagnosticIDs.cpp
===================================================================
--- cfe/trunk/lib/Basic/DiagnosticIDs.cpp
+++ cfe/trunk/lib/Basic/DiagnosticIDs.cpp
@@ -583,7 +583,7 @@
 }
 
 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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39372.122822.patch
Type: text/x-patch
Size: 1813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171114/2f3b58bc/attachment-0001.bin>


More information about the cfe-commits mailing list