summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/Diagnostic.h
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-06-12 15:46:16 +0000
committerdim <dim@FreeBSD.org>2011-06-12 15:46:16 +0000
commitc49018d9cce52d8c9f34b44865ec3ba8e89a1488 (patch)
treec5e9e10bc189de0058aa763c47b9920a8351b7df /include/clang/Basic/Diagnostic.h
parent110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab (diff)
downloadFreeBSD-src-c49018d9cce52d8c9f34b44865ec3ba8e89a1488.zip
FreeBSD-src-c49018d9cce52d8c9f34b44865ec3ba8e89a1488.tar.gz
Vendor import of clang trunk r132879:
http://llvm.org/svn/llvm-project/cfe/trunk@132879
Diffstat (limited to 'include/clang/Basic/Diagnostic.h')
-rw-r--r--include/clang/Basic/Diagnostic.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h
index 7fc400f..fa76324 100644
--- a/include/clang/Basic/Diagnostic.h
+++ b/include/clang/Basic/Diagnostic.h
@@ -32,6 +32,7 @@ namespace clang {
class LangOptions;
class Preprocessor;
class DiagnosticErrorTrap;
+ class StoredDiagnostic;
/// \brief Annotates a diagnostic with some code that should be
/// inserted, removed, or replaced to fix the problem.
@@ -400,6 +401,7 @@ public:
void setExtensionHandlingBehavior(ExtensionHandling H) {
ExtBehavior = H;
}
+ ExtensionHandling getExtensionHandlingBehavior() const { return ExtBehavior; }
/// AllExtensionsSilenced - This is a counter bumped when an __extension__
/// block is encountered. When non-zero, all extension diagnostics are
@@ -423,7 +425,7 @@ public:
///
/// 'Loc' is the source location that this change of diagnostic state should
/// take affect. It can be null if we are setting the state from command-line.
- bool setDiagnosticGroupMapping(const char *Group, diag::Mapping Map,
+ bool setDiagnosticGroupMapping(llvm::StringRef Group, diag::Mapping Map,
SourceLocation Loc = SourceLocation()) {
return Diags->setDiagnosticGroupMapping(Group, Map, Loc, *this);
}
@@ -487,6 +489,8 @@ public:
inline DiagnosticBuilder Report(SourceLocation Pos, unsigned DiagID);
inline DiagnosticBuilder Report(unsigned DiagID);
+ void Report(const StoredDiagnostic &storedDiag);
+
/// \brief Determine whethere there is already a diagnostic in flight.
bool isDiagnosticInFlight() const { return CurDiagID != ~0U; }
@@ -839,8 +843,11 @@ inline DiagnosticBuilder Diagnostic::Report(unsigned DiagID) {
/// about the currently in-flight diagnostic.
class DiagnosticInfo {
const Diagnostic *DiagObj;
+ llvm::StringRef StoredDiagMessage;
public:
explicit DiagnosticInfo(const Diagnostic *DO) : DiagObj(DO) {}
+ DiagnosticInfo(const Diagnostic *DO, llvm::StringRef storedDiagMessage)
+ : DiagObj(DO), StoredDiagMessage(storedDiagMessage) {}
const Diagnostic *getDiags() const { return DiagObj; }
unsigned getID() const { return DiagObj->CurDiagID; }
OpenPOWER on IntegriCloud