[cfe-commits] r152641 - /cfe/trunk/include/clang/Basic/Diagnostic.h

Daniel Dunbar daniel at zuster.org
Tue Mar 13 11:30:42 PDT 2012


Author: ddunbar
Date: Tue Mar 13 13:30:42 2012
New Revision: 152641

URL: http://llvm.org/viewvc/llvm-project?rev=152641&view=rev
Log:
[Basic] Make DiagnosticBuilder::{isActive,getLocation,getDiagID} protected.

Modified:
    cfe/trunk/include/clang/Basic/Diagnostic.h

Modified: cfe/trunk/include/clang/Basic/Diagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.h?rev=152641&r1=152640&r2=152641&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Tue Mar 13 13:30:42 2012
@@ -765,6 +765,22 @@
 
 protected:
   void FlushCounts();
+
+  /// isActive - Determine whether this diagnostic is still active.
+  bool isActive() const { return DiagObj != 0; }
+
+  /// \brief Retrieve the active diagnostic ID.
+  ///
+  /// \pre \c isActive()
+  unsigned getDiagID() const {
+    assert(isActive() && "DiagnosticsEngine is inactive");
+    return DiagObj->CurDiagID;
+  }
+
+  /// \brief Retrieve the active diagnostic's location.
+  ///
+  /// \pre \c isActive()
+  SourceLocation getLocation() const { return DiagObj->CurDiagLoc; }
   
 public:
   /// Copy constructor.  When copied, this "takes" the diagnostic info from the
@@ -801,22 +817,6 @@
     if (DiagObj)
       Emit();
   }
-
-  /// isActive - Determine whether this diagnostic is still active.
-  bool isActive() const { return DiagObj != 0; }
-
-  /// \brief Retrieve the active diagnostic ID.
-  ///
-  /// \pre \c isActive()
-  unsigned getDiagID() const {
-    assert(isActive() && "DiagnosticsEngine is inactive");
-    return DiagObj->CurDiagID;
-  }
-
-  /// \brief Retrieve the active diagnostic's location.
-  ///
-  /// \pre \c isActive()
-  SourceLocation getLocation() const { return DiagObj->CurDiagLoc; }
   
   /// \brief Clear out the current diagnostic.
   void Clear() { DiagObj = 0; }





More information about the cfe-commits mailing list