llvm-for-llvmta/tools/clang/test/Frontend/warning-mapping-3.c

11 lines
374 B
C
Raw Permalink Normal View History

2022-04-25 13:02:35 +02:00
// Check that -Werror and -Wfatal-error interact properly.
//
// Verify mode doesn't work with fatal errors, just use FileCheck here.
//
// RUN: not %clang_cc1 -Wunused-function -Werror -Wfatal-errors %s 2> %t.err
// RUN: FileCheck < %t.err %s
// CHECK: fatal error: unused function
// CHECK: 1 error generated
static void f0(void) {} // expected-fatal {{unused function}}