]> granicus.if.org Git - clang/commitdiff
[Basic] Make DiagnosticBuilder::{isActive,getLocation,getDiagID} protected.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 13 Mar 2012 18:30:42 +0000 (18:30 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 13 Mar 2012 18:30:42 +0000 (18:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152641 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/Diagnostic.h

index 9d3e02b65755e37fa2d43c2b8190e8f825feb9fe..cdfc49b4b78c3babb141148cd526aa50a92a75b4 100644 (file)
@@ -765,6 +765,22 @@ class DiagnosticBuilder {
 
 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 @@ public:
     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; }