[cfe-commits] r140756 - in /cfe/trunk: include/clang/Basic/Diagnostic.h include/clang/Basic/DiagnosticIDs.h lib/Basic/DiagnosticIDs.cpp

Daniel Dunbar daniel at zuster.org
Wed Sep 28 18:20:29 PDT 2011


Author: ddunbar
Date: Wed Sep 28 20:20:28 2011
New Revision: 140756

URL: http://llvm.org/viewvc/llvm-project?rev=140756&view=rev
Log:
Basic/Diagnostic: Eliminate the extra "mapping" out-parameter now that I killed the sole client.

Modified:
    cfe/trunk/include/clang/Basic/Diagnostic.h
    cfe/trunk/include/clang/Basic/DiagnosticIDs.h
    cfe/trunk/lib/Basic/DiagnosticIDs.cpp

Modified: cfe/trunk/include/clang/Basic/Diagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.h?rev=140756&r1=140755&r2=140756&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Wed Sep 28 20:20:28 2011
@@ -515,9 +515,8 @@
   ///
   /// \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

Modified: cfe/trunk/include/clang/Basic/DiagnosticIDs.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticIDs.h?rev=140756&r1=140755&r2=140756&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticIDs.h (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticIDs.h Wed Sep 28 20:20:28 2011
@@ -234,16 +234,14 @@
   /// \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.

Modified: cfe/trunk/lib/Basic/DiagnosticIDs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/DiagnosticIDs.cpp?rev=140756&r1=140755&r2=140756&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/DiagnosticIDs.cpp (original)
+++ cfe/trunk/lib/Basic/DiagnosticIDs.cpp Wed Sep 28 20:20:28 2011
@@ -478,15 +478,14 @@
 /// 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::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 @@
     MappingInfo = GetDefaultDiagMapping(DiagID);
     Diag.setDiagnosticMappingInternal(DiagID, MappingInfo, State, false, false);
   }
-  
-  if (mapping)
-    *mapping = (diag::Mapping) (MappingInfo & 7);
 
   bool ShouldEmitInSystemHeader = false;
 





More information about the cfe-commits mailing list