aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/Diagnostic.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
commit06d4ba388873e6d1cfa9cd715a8935ecc8cd2097 (patch)
tree3eb853da77d46cc77c4b017525a422f9ddb1385b /include/clang/Basic/Diagnostic.h
parent30d791273d07fac9c0c1641a0731191bca6e8606 (diff)
downloadsrc-06d4ba388873e6d1cfa9cd715a8935ecc8cd2097.tar.gz
src-06d4ba388873e6d1cfa9cd715a8935ecc8cd2097.zip
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):vendor/clang/clang-release_360-r226102
Notes
Notes: svn path=/vendor/clang/dist/; revision=277325 svn path=/vendor/clang/clang-release_360-r226102/; revision=277326; tag=vendor/clang/clang-release_360-r226102
Diffstat (limited to 'include/clang/Basic/Diagnostic.h')
-rw-r--r--include/clang/Basic/Diagnostic.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h
index a7b2ba270d46..91e94db802b1 100644
--- a/include/clang/Basic/Diagnostic.h
+++ b/include/clang/Basic/Diagnostic.h
@@ -12,8 +12,8 @@
///
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_DIAGNOSTIC_H
-#define LLVM_CLANG_DIAGNOSTIC_H
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTIC_H
+#define LLVM_CLANG_BASIC_DIAGNOSTIC_H
#include "clang/Basic/DiagnosticIDs.h"
#include "clang/Basic/DiagnosticOptions.h"
@@ -187,7 +187,7 @@ private:
IntrusiveRefCntPtr<DiagnosticIDs> Diags;
IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts;
DiagnosticConsumer *Client;
- bool OwnsDiagClient;
+ std::unique_ptr<DiagnosticConsumer> Owner;
SourceManager *SourceMgr;
/// \brief Mapping information for diagnostics.
@@ -302,7 +302,6 @@ private:
unsigned NumWarnings; ///< Number of warnings reported
unsigned NumErrors; ///< Number of errors reported
- unsigned NumErrorsSuppressed; ///< Number of errors suppressed
/// \brief A function pointer that converts an opaque diagnostic
/// argument to a strings.
@@ -369,14 +368,11 @@ public:
const DiagnosticConsumer *getClient() const { return Client; }
/// \brief Determine whether this \c DiagnosticsEngine object own its client.
- bool ownsClient() const { return OwnsDiagClient; }
-
+ bool ownsClient() const { return Owner != nullptr; }
+
/// \brief Return the current diagnostic client along with ownership of that
/// client.
- DiagnosticConsumer *takeClient() {
- OwnsDiagClient = false;
- return Client;
- }
+ std::unique_ptr<DiagnosticConsumer> takeClient() { return std::move(Owner); }
bool hasSourceManager() const { return SourceMgr != nullptr; }
SourceManager &getSourceManager() const {