File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,13 @@ _3CInterface::_3CInterface(const struct _3COptions &CCopt,
186
186
187
187
ConstraintsBuilt = false ;
188
188
189
+ if (VerifyDiagnosticOutput) {
190
+ errs () << " 3C initialization error: Diagnostic verification is currently "
191
+ " unsupported.\n " ;
192
+ Failed = true ;
193
+ return ;
194
+ }
195
+
189
196
if (OutputPostfix != " -" && !OutputDir.empty ()) {
190
197
errs () << " 3C initialization error: Cannot use both -output-postfix and "
191
198
" -output-dir\n " ;
@@ -287,6 +294,9 @@ bool _3CInterface::parseASTs() {
287
294
288
295
auto *Tool = new ClangTool (*CurrCompDB, SourceFiles);
289
296
Tool->appendArgumentsAdjuster (getIgnoreCheckedPointerAdjuster ());
297
+ // NOTE: This code is currently unreachable because VerifyDiagnosticOutput is
298
+ // rejected in the _3CInterface constructor.
299
+ //
290
300
// TODO: This currently only enables compiler diagnostic verification.
291
301
// see https://github.com/correctcomputation/checkedc-clang/issues/425
292
302
// for status.
Original file line number Diff line number Diff line change 1
1
// RUN: rm -rf %t*
2
- // RUN: 3c -base-dir=%S -verify - alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
3
- // RUN: 3c -base-dir=%S -verify - addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
4
- // RUN: 3c -base-dir=%S -verify - alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
5
- // RUN: 3c -base-dir=%S -verify - alltypes -output-dir=%t.checked %s --
6
- // RUN: 3c -base-dir=%t.checked -verify - alltypes %t.checked/macro_function_call.c -- | diff %t.checked/macro_function_call.c -
2
+ // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
3
+ // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
4
+ // RUN: 3c -base-dir=%S -alltypes -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
5
+ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s --
6
+ // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/macro_function_call.c -- | diff %t.checked/macro_function_call.c -
7
7
8
8
// Test fix for https://github.com/correctcomputation/checkedc-clang/issues/439
9
9
// We cannot insert casts on function calls inside macros, so constraints must
12
12
13
13
// 3C emits a warning if it fails inserting a cast. Ensure the test fails if
14
14
// this happens.
15
+ //
16
+ // NOTICE: This part of the test is disabled (the -verify option has been
17
+ // removed from the 3c RUN commands) until we have a replacement for the
18
+ // diagnostic verifier
19
+ // (https://github.com/correctcomputation/checkedc-clang/issues/503).
20
+ // TODO: Re-enable it when we do.
21
+ //
15
22
// expected-no-diagnostics
16
23
17
24
// Unsafe call in macro. This would require an _Assume_bounds_cast, but we
You can’t perform that action at this time.
0 commit comments