1 @import config; 2 3 int *test_foo() { 4 return foo(); 5 } 6 7 char *test_bar() { 8 return bar(); // expected-warning{{implicit declaration of function 'bar' is invalid in C99}} \ 9 // expected-warning{{incompatible integer to pointer conversion}} 10 } 11 12 #undef WANT_FOO // expected-note{{macro was #undef'd here}} 13 @import config; // expected-warning{{#undef of configuration macro 'WANT_FOO' has no effect on the import of 'config'; pass '-UWANT_FOO' on the command line to configure the module}} 14 15 #define WANT_FOO 2 // expected-note{{macro was defined here}} 16 @import config; // expected-warning{{definition of configuration macro 'WANT_FOO' has no effect on the import of 'config'; pass '-DWANT_FOO=...' on the command line to configure the module}} 17 18 #undef WANT_FOO 19 #define WANT_FOO 1 20 @import config; // okay 21 22 #define WANT_BAR 1 // expected-note{{macro was defined here}} 23 @import config; // expected-warning{{definition of configuration macro 'WANT_BAR' has no effect on the import of 'config'; pass '-DWANT_BAR=...' on the command line to configure the module}} 24 25 // RUN: rm -rf %t 26 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -DWANT_FOO=1 -emit-module -fmodule-name=config %S/Inputs/module.map 27 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -DWANT_FOO=1 %s -verify 28 29