1 // RUN: %clang_cc1 -O2 -verify -emit-codegen-only %s 2 3 __attribute__((error("oh no foo"))) void foo(void); 4 5 __attribute__((error("oh no bar"))) void bar(void); 6 x(void)7int x(void) { 8 return 8 % 2 == 1; 9 } baz(void)10void baz(void) { 11 foo(); // expected-error {{call to 'foo' declared with 'error' attribute: oh no foo}} 12 if (x()) 13 bar(); 14 } 15 16 // FIXME: indirect call detection not yet supported. 17 void (*quux)(void); 18 indirect(void)19void indirect(void) { 20 quux = foo; 21 quux(); 22 } 23