diff --git a/clang/include/clang/Basic/Diagnostic.h b/clang/include/clang/Basic/Diagnostic.h index 71240f4fdcd8..4136b5cc0598 100644 --- a/clang/include/clang/Basic/Diagnostic.h +++ b/clang/include/clang/Basic/Diagnostic.h @@ -563,15 +563,6 @@ private: /// \brief Report the delayed diagnostic. void ReportDelayed(); - - /// getDiagnosticMappingInfo - Return the mapping info currently set for the - /// specified builtin diagnostic. This returns the high bit encoding, or zero - /// if the field is completely uninitialized. - diag::Mapping getDiagnosticMappingInfo(diag::kind Diag, - DiagState *State) const { - return State->getMapping(Diag); - } - void setDiagnosticMappingInternal(unsigned DiagId, unsigned Map, DiagState *State, bool isUser, bool isPragma) const { diff --git a/clang/lib/Basic/DiagnosticIDs.cpp b/clang/lib/Basic/DiagnosticIDs.cpp index 1e76a26de729..d8a0afc1cc57 100644 --- a/clang/lib/Basic/DiagnosticIDs.cpp +++ b/clang/lib/Basic/DiagnosticIDs.cpp @@ -507,8 +507,7 @@ DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, unsigned DiagClass, DiagnosticsEngine::DiagState *State = Pos->State; // Get the mapping information, if unset, compute it lazily. - unsigned MappingInfo = Diag.getDiagnosticMappingInfo((diag::kind)DiagID, - State); + unsigned MappingInfo = State->getMapping((diag::kind) DiagID); if (MappingInfo == 0) { MappingInfo = GetDefaultDiagMapping(DiagID); Diag.setDiagnosticMappingInternal(DiagID, MappingInfo, State, false, false);