]> granicus.if.org Git - clang/commitdiff
Basic/Diagnostic: Eliminate the extra "mapping" out-parameter now that I killed the...
authorDaniel Dunbar <daniel@zuster.org>
Thu, 29 Sep 2011 01:20:28 +0000 (01:20 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 29 Sep 2011 01:20:28 +0000 (01:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140756 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/Diagnostic.h
include/clang/Basic/DiagnosticIDs.h
lib/Basic/DiagnosticIDs.cpp

index d62dfb5ab7a3de6ae1a06318a526ad2eda4725ac..71240f4fdcd84202142836096e0f3260f94a484c 100644 (file)
@@ -515,9 +515,8 @@ public:
   ///
   /// \param Loc The source location we are interested in finding out the
   /// diagnostic state. Can be null in order to query the latest state.
-  Level getDiagnosticLevel(unsigned DiagID, SourceLocation Loc,
-                           diag::Mapping *mapping = 0) const {
-    return (Level)Diags->getDiagnosticLevel(DiagID, Loc, *this, mapping);
+  Level getDiagnosticLevel(unsigned DiagID, SourceLocation Loc) const {
+    return (Level)Diags->getDiagnosticLevel(DiagID, Loc, *this);
   }
 
   /// Report - Issue the message to the client.  @c DiagID is a member of the
index e2884a539ac5b855c1b7cdca9f64d944d91bd1c9..c50bc662fb66b6b69ede834dd2660cee928e34f7 100644 (file)
@@ -234,16 +234,14 @@ private:
   /// \param Loc The source location we are interested in finding out the
   /// diagnostic state. Can be null in order to query the latest state.
   DiagnosticIDs::Level getDiagnosticLevel(unsigned DiagID, SourceLocation Loc,
-                                          const DiagnosticsEngine &Diag,
-                                          diag::Mapping *mapping = 0) const;
+                                          const DiagnosticsEngine &Diag) const;
 
   /// getDiagnosticLevel - This is an internal implementation helper used when
   /// DiagClass is already known.
   DiagnosticIDs::Level getDiagnosticLevel(unsigned DiagID,
                                           unsigned DiagClass,
                                           SourceLocation Loc,
-                                          const DiagnosticsEngine &Diag,
-                                          diag::Mapping *mapping = 0) const;
+                                          const DiagnosticsEngine &Diag) const;
 
   /// ProcessDiag - This is the method used to report a diagnostic that is
   /// finally fully formed.
index 9347f9cb17015c4402b305910bea0b7156c20260..1e76a26de72936326eae8c4dd8328f47769931f1 100644 (file)
@@ -478,15 +478,14 @@ StringRef DiagnosticIDs::getDescription(unsigned DiagID) const {
 /// by consumable the DiagnosticClient.
 DiagnosticIDs::Level
 DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, SourceLocation Loc,
-                                  const DiagnosticsEngine &Diag,
-                                  diag::Mapping *mapping) const {
+                                  const DiagnosticsEngine &Diag) const {
   // Handle custom diagnostics, which cannot be mapped.
   if (DiagID >= diag::DIAG_UPPER_LIMIT)
     return CustomDiagInfo->getLevel(DiagID);
 
   unsigned DiagClass = getBuiltinDiagClass(DiagID);
   assert(DiagClass != CLASS_NOTE && "Cannot get diagnostic level of a note!");
-  return getDiagnosticLevel(DiagID, DiagClass, Loc, Diag, mapping);
+  return getDiagnosticLevel(DiagID, DiagClass, Loc, Diag);
 }
 
 /// \brief Based on the way the client configured the Diagnostic
@@ -498,8 +497,7 @@ DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, SourceLocation Loc,
 DiagnosticIDs::Level
 DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, unsigned DiagClass,
                                   SourceLocation Loc,
-                                  const DiagnosticsEngine &Diag,
-                                  diag::Mapping *mapping) const {
+                                  const DiagnosticsEngine &Diag) const {
   // Specific non-error diagnostics may be mapped to various levels from ignored
   // to error.  Errors can only be mapped to fatal.
   DiagnosticIDs::Level Result = DiagnosticIDs::Fatal;
@@ -515,9 +513,6 @@ DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, unsigned DiagClass,
     MappingInfo = GetDefaultDiagMapping(DiagID);
     Diag.setDiagnosticMappingInternal(DiagID, MappingInfo, State, false, false);
   }
-  
-  if (mapping)
-    *mapping = (diag::Mapping) (MappingInfo & 7);
 
   bool ShouldEmitInSystemHeader = false;