1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -Werror %s -analyzer-store=region -verify 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc // This test case illustrates that using '-analyze' overrides the effect of 4*f4a2713aSLionel Sambuc // -Werror. This allows basic warnings not to interfere with producing 5*f4a2713aSLionel Sambuc // analyzer results. 6*f4a2713aSLionel Sambuc f(int * p)7*f4a2713aSLionel Sambucchar* f(int *p) { 8*f4a2713aSLionel Sambuc return p; // expected-warning{{incompatible pointer types}} 9*f4a2713aSLionel Sambuc } 10*f4a2713aSLionel Sambuc g(int * p)11*f4a2713aSLionel Sambucvoid g(int *p) { 12*f4a2713aSLionel Sambuc if (!p) *p = 0; // expected-warning{{null}} 13*f4a2713aSLionel Sambuc } 14*f4a2713aSLionel Sambuc 15