forked from OSchip/llvm-project
tests: Add some more tests for warning mappings.
llvm-svn: 140764
This commit is contained in:
parent
458edfa2b7
commit
e9a700cba1
clang/test/Frontend
|
@ -0,0 +1,12 @@
|
|||
// Regression check that -pedantic-errors doesn't cause other diagnostics to
|
||||
// become errors.
|
||||
//
|
||||
// RUN: %clang_cc1 -verify -Weverything -pedantic-errors %s
|
||||
//
|
||||
// FIXME: This is currently broken.
|
||||
// XFAIL: *
|
||||
|
||||
int f0(int, unsigned);
|
||||
int f0(int x, unsigned y) {
|
||||
return x < y; // expected-warning {{comparison of integers}}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
// Check that -w has higher priority than -Werror.
|
||||
// RUN: %clang_cc1 -verify -Wsign-compare -Werror -w %s
|
||||
|
||||
int f0(int x, unsigned y) {
|
||||
return x < y;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
// Check that -w has lower priority than -pedantic-errors.
|
||||
// RUN: %clang_cc1 -verify -pedantic-errors -w %s
|
||||
//
|
||||
// FIXME: We currently get this wrong.
|
||||
// XFAIL: *
|
||||
|
||||
void f0() { f1(); } // expected-error {{implicit declaration of function}}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// 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}}
|
Loading…
Reference in New Issue