Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / override-werror.c
blobe84c20fc0696ffd9db9b1a4ec1b6d0e592b8ef2c
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core -Werror %s -verify
2 // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core -Werror %s -analyzer-werror -verify=werror
4 // This test case illustrates that using '-analyze' overrides the effect of
5 // -Werror. This allows basic warnings not to interfere with producing
6 // analyzer results.
8 char* f(int *p) {
9 return p; // expected-warning{{incompatible pointer types}} \
10 werror-warning{{incompatible pointer types}}
13 void g(int *p) {
14 if (!p) *p = 0; // expected-warning{{null}} \
15 werror-error{{null}}