summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/DiagnosticOptions.def
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2015-06-13 07:11:40 +0000
committerEric Fiselier <eric@efcs.ca>2015-06-13 07:11:40 +0000
commit72cdbbce28d3c016d5b88acd3cf439b10d762674 (patch)
tree7e58dbb4e87bc1f0876f7e78d2d1e1dd0ddd02e9 /include/clang/Basic/DiagnosticOptions.def
parentd9462c2afcdad32f7543d7b6504e39b022abb81f (diff)
Add `-verify-ignore-unexpected` option to ignore unexpected diagnostics in VerifyDiagnosticsConsumer
Summary: The goal of this patch is to make `-verify` easier to use when testing libc++. The `notes` attached to compile error diagnostics are numerous and relatively unstable when they reference libc++ header internals. This patch allows libc++ to write stable compilation failure tests by allowing unexpected diagnostic messages to be ignored where they are not relevant. This patch adds a new CC1 flag called `-verify-ignore-unexpected`. `-verify-ignore-unexpected` tells `VerifyDiagnosticsConsumer` to ignore *all* unexpected diagnostic messages. `-verify-ignore-unexpected=<LevelList>` can be used to only ignore certain diagnostic levels. `<LevelList>` is a comma separated list of diagnostic levels to ignore. The supported levels are `note`, `remark`, `warning` and `error`. Reviewers: bogner, grosser, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10138 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239665 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticOptions.def')
-rw-r--r--include/clang/Basic/DiagnosticOptions.def5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticOptions.def b/include/clang/Basic/DiagnosticOptions.def
index fdd325446e..f4ba6da81f 100644
--- a/include/clang/Basic/DiagnosticOptions.def
+++ b/include/clang/Basic/DiagnosticOptions.def
@@ -69,7 +69,10 @@ ENUM_DIAGOPT(ShowOverloads, OverloadsShown, 1,
DIAGOPT(VerifyDiagnostics, 1, 0) /// Check that diagnostics match the expected
/// diagnostics, indicated by markers in the
/// input source file.
-
+ENUM_DIAGOPT(VerifyIgnoreUnexpected, DiagnosticLevelMask, 4,
+ DiagnosticLevelMask::None) /// Ignore unexpected diagnostics of
+ /// the specified levels when using
+ /// -verify.
DIAGOPT(ElideType, 1, 0) /// Elide identical types in template diffing
DIAGOPT(ShowTemplateTree, 1, 0) /// Print a template tree when diffing
DIAGOPT(CLFallbackMode, 1, 0) /// Format for clang-cl fallback mode