1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=core -verify %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc // For now, don't inline varargs. foo(int * x,...)4*f4a2713aSLionel Sambucvoid foo(int *x, ...) { 5*f4a2713aSLionel Sambuc *x = 1; 6*f4a2713aSLionel Sambuc } 7*f4a2713aSLionel Sambuc bar()8*f4a2713aSLionel Sambucvoid bar() { 9*f4a2713aSLionel Sambuc foo(0, 2); // no-warning 10*f4a2713aSLionel Sambuc } 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc // For now, don't inline vararg blocks. 13*f4a2713aSLionel Sambuc void (^baz)(int *x, ...) = ^(int *x, ...) { *x = 1; }; 14*f4a2713aSLionel Sambuc taz()15*f4a2713aSLionel Sambucvoid taz() { 16*f4a2713aSLionel Sambuc baz(0, 2); // no-warning 17*f4a2713aSLionel Sambuc } 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambuc // For now, don't inline global blocks. 20*f4a2713aSLionel Sambuc void (^qux)(int *p) = ^(int *p) { *p = 1; }; test_qux()21*f4a2713aSLionel Sambucvoid test_qux() { 22*f4a2713aSLionel Sambuc qux(0); // no-warning 23*f4a2713aSLionel Sambuc } 24*f4a2713aSLionel Sambuc 25*f4a2713aSLionel Sambuc test_analyzer_is_running()26*f4a2713aSLionel Sambucvoid test_analyzer_is_running() { 27*f4a2713aSLionel Sambuc int *p = 0; 28*f4a2713aSLionel Sambuc *p = 0xDEADBEEF; // expected-warning {{null}} 29*f4a2713aSLionel Sambuc } 30