r318150 - Make DiagnosticIDs::getAllDiagnostics static. NFC.
Gabor Horvath via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 14 04:14:50 PST 2017
Author: xazax
Date: Tue Nov 14 04:14:49 2017
New Revision: 318150
URL: http://llvm.org/viewvc/llvm-project?rev=318150&view=rev
Log:
Make DiagnosticIDs::getAllDiagnostics static. NFC.
Patch by: Andras Leitereg!
Differential Revision: https://reviews.llvm.org/D39372
Modified:
cfe/trunk/include/clang/Basic/DiagnosticIDs.h
cfe/trunk/lib/Basic/Diagnostic.cpp
cfe/trunk/lib/Basic/DiagnosticIDs.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticIDs.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticIDs.h?rev=318150&r1=318149&r2=318150&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticIDs.h (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticIDs.h Tue Nov 14 04:14:49 2017
@@ -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.
Modified: cfe/trunk/lib/Basic/Diagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Diagnostic.cpp?rev=318150&r1=318149&r2=318150&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
+++ cfe/trunk/lib/Basic/Diagnostic.cpp Tue Nov 14 04:14:49 2017
@@ -364,7 +364,7 @@ void DiagnosticsEngine::setSeverityForAl
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)
Modified: cfe/trunk/lib/Basic/DiagnosticIDs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/DiagnosticIDs.cpp?rev=318150&r1=318149&r2=318150&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/DiagnosticIDs.cpp (original)
+++ cfe/trunk/lib/Basic/DiagnosticIDs.cpp Tue Nov 14 04:14:49 2017
@@ -583,7 +583,7 @@ DiagnosticIDs::getDiagnosticsInGroup(dia
}
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);
More information about the cfe-commits
mailing list