diff options
author | Andy Gibbs <andyg1001@hotmail.co.uk> | 2012-10-19 12:49:32 +0000 |
---|---|---|
committer | Andy Gibbs <andyg1001@hotmail.co.uk> | 2012-10-19 12:49:32 +0000 |
commit | 266dba3661928d26f043560b169bea87578aa917 (patch) | |
tree | 0c8f3042a1255fb78437c4e239921fd92fe30a96 /include/clang/Basic/DiagnosticFrontendKinds.td | |
parent | 8e8fb3be5bd78f0564444eca02b404566a5f3b5d (diff) | |
download | clang-266dba3661928d26f043560b169bea87578aa917.tar.gz clang-266dba3661928d26f043560b169bea87578aa917.tar.bz2 clang-266dba3661928d26f043560b169bea87578aa917.tar.xz |
Change VerifyDiagnosticConsumer so that it *must* contain at least one "expected-*" directive. As a result, for test-cases that are not expected to generate any diagnostics, an additional directive "expected-no-diagnostics" has been implemented which can then be included in such test-cases. This new directive may not be used in conjunction with any other "expected-*" directive.
This change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file.
Patch reviewed by David Blaikie.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticFrontendKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticFrontendKinds.td | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticFrontendKinds.td b/include/clang/Basic/DiagnosticFrontendKinds.td index 417a22c96d..c0099310cb 100644 --- a/include/clang/Basic/DiagnosticFrontendKinds.td +++ b/include/clang/Basic/DiagnosticFrontendKinds.td @@ -76,6 +76,11 @@ def err_verify_invalid_content : Error< def err_verify_inconsistent_diags : Error< "'%0' diagnostics %select{expected|seen}1 but not %select{seen|expected}1: " "%2">; +def err_verify_invalid_no_diags : Error< + "%select{expected|'expected-no-diagnostics'}0 directive cannot follow " + "%select{'expected-no-diagnostics' directive|other expected directives}0">; +def err_verify_no_directives : Error< + "no expected directives found: consider use of 'expected-no-diagnostics'">; def note_fixit_applied : Note<"FIX-IT applied suggested code changes">; def note_fixit_in_macro : Note< |