aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-09-29 02:03:01 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-09-29 02:03:01 +0000
commitaeacae523a1c6e5bb99d12754415bbbc3ccb86c9 (patch)
tree7c43f87024d9501ff9b216eb86e8e795be4eae22 /include/clang
parentbe1aa410274b28fc143c47c814f07c989f4534d6 (diff)
Basic/Diagnostic: Kill off a few unnecessary functions now that refactoring is done, and add a note that the new setDiagnosticGroup{...} methods only operate on the current diagnostic state.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/Diagnostic.h13
-rw-r--r--include/clang/Basic/DiagnosticIDs.h12
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; }