diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Basic/Diagnostic.h | 13 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticIDs.h | 12 |
2 files changed, 6 insertions, 19 deletions
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h index 02a937d1a9..492c8b069e 100644 --- a/include/clang/Basic/Diagnostic.h +++ b/include/clang/Basic/Diagnostic.h @@ -187,13 +187,6 @@ private: DiagMap[Diag] = Info; } - DiagnosticMappingInfo getMappingInfo(diag::kind Diag) const { - const_iterator I = DiagMap.find(Diag); - if (I != DiagMap.end()) - return I->second; - return DiagnosticMappingInfo::MakeUnset(); - } - DiagnosticMappingInfo &getOrAddMappingInfo(diag::kind Diag); const_iterator begin() const { return DiagMap.begin(); } @@ -457,12 +450,14 @@ public: bool setDiagnosticGroupMapping(StringRef Group, diag::Mapping Map, SourceLocation Loc = SourceLocation()); - /// \brief Set the warning-as-error flag for the given diagnostic group. + /// \brief Set the warning-as-error flag for the given diagnostic group. This + /// function always only operates on the current diagnostic state. /// /// \returns True if the given group is unknown, false otherwise. bool setDiagnosticGroupWarningAsError(StringRef Group, bool Enabled); - /// \brief Set the error-as-fatal flag for the given diagnostic group. + /// \brief Set the error-as-fatal flag for the given diagnostic group. This + /// function always only operates on the current diagnostic state. /// /// \returns True if the given group is unknown, false otherwise. bool setDiagnosticGroupErrorAsFatal(StringRef Group, bool Enabled); diff --git a/include/clang/Basic/DiagnosticIDs.h b/include/clang/Basic/DiagnosticIDs.h index a0aec249cd..e158bf52b5 100644 --- a/include/clang/Basic/DiagnosticIDs.h +++ b/include/clang/Basic/DiagnosticIDs.h @@ -78,14 +78,8 @@ class DiagnosticMappingInfo { unsigned HasNoErrorAsFatal : 1; public: - static DiagnosticMappingInfo MakeUnset() { - DiagnosticMappingInfo Result; - Result.Mapping = 0; - return Result; - } - - static DiagnosticMappingInfo MakeInfo(diag::Mapping Mapping, - bool IsUser, bool IsPragma) { + static DiagnosticMappingInfo Make(diag::Mapping Mapping, bool IsUser, + bool IsPragma) { DiagnosticMappingInfo Result; Result.Mapping = Mapping; Result.IsUser = IsUser; @@ -96,8 +90,6 @@ public: return Result; } - bool isUnset() const { return Mapping == 0; } - diag::Mapping getMapping() const { return diag::Mapping(Mapping); } void setMapping(diag::Mapping Value) { Mapping = Value; } |