summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-22 21:58:33 +0000
committerAlp Toker <alp@nuanti.com>2014-06-22 21:58:33 +0000
commitac4e8e5fcad38e749a1e151b124fd3e71c6747a6 (patch)
tree5f6df8655b15aaafd0649799aa816c0f443ffc52 /clang/include
parent343cd6f0560bfd0e82b8546e357aa31856e97bc6 (diff)
downloadbcm5719-llvm-ac4e8e5fcad38e749a1e151b124fd3e71c6747a6.tar.gz
bcm5719-llvm-ac4e8e5fcad38e749a1e151b124fd3e71c6747a6.zip
DiagnosticIDs: use diagnostic severities to simplify extension handling
llvm-svn: 211479
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Basic/Diagnostic.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/clang/include/clang/Basic/Diagnostic.h b/clang/include/clang/Basic/Diagnostic.h
index b9da131de38..71642a9b7eb 100644
--- a/clang/include/clang/Basic/Diagnostic.h
+++ b/clang/include/clang/Basic/Diagnostic.h
@@ -146,13 +146,6 @@ public:
Fatal = DiagnosticIDs::Fatal
};
- /// \brief How do we handle otherwise-unmapped extension?
- ///
- /// This is controlled by -pedantic and -pedantic-errors.
- enum ExtensionHandling {
- Ext_Ignore, Ext_Warn, Ext_Error
- };
-
enum ArgumentKind {
ak_std_string, ///< std::string
ak_c_string, ///< const char *
@@ -190,7 +183,7 @@ private:
// 0 -> no limit.
unsigned ConstexprBacktraceLimit; // Cap on depth of constexpr evaluation
// backtrace stack, 0 -> no limit.
- ExtensionHandling ExtBehavior; // Map extensions onto warnings or errors?
+ diag::Severity ExtBehavior; // Map extensions to warnings or errors?
IntrusiveRefCntPtr<DiagnosticIDs> Diags;
IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts;
DiagnosticConsumer *Client;
@@ -523,10 +516,8 @@ public:
/// mapped onto ignore/warning/error.
///
/// This corresponds to the GCC -pedantic and -pedantic-errors option.
- void setExtensionHandlingBehavior(ExtensionHandling H) {
- ExtBehavior = H;
- }
- ExtensionHandling getExtensionHandlingBehavior() const { return ExtBehavior; }
+ void setExtensionHandlingBehavior(diag::Severity H) { ExtBehavior = H; }
+ diag::Severity getExtensionHandlingBehavior() const { return ExtBehavior; }
/// \brief Counter bumped when an __extension__ block is/ encountered.
///
OpenPOWER on IntegriCloud