1// RUN: rm -rf %t 2// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodule-cache-path %t -fmodule-name=macros %S/Inputs/module.map 3// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodule-cache-path %t %s 4// RUN: %clang_cc1 -E -fmodules -x objective-c -fmodule-cache-path %t %s | FileCheck -check-prefix CHECK-PREPROCESSED %s 5// FIXME: When we have a syntax for modules in C, use that. 6 7@__experimental_modules_import macros; 8 9#ifndef INTEGER 10# error INTEGER macro should be visible 11#endif 12 13#ifdef FLOAT 14# error FLOAT macro should not be visible 15#endif 16 17#ifdef MODULE 18# error MODULE macro should not be visible 19#endif 20 21// CHECK-PREPROCESSED: double d 22double d; 23DOUBLE *dp = &d; 24 25#__public_macro WIBBLE // expected-error{{no macro named 'WIBBLE'}} 26 27void f() { 28 // CHECK-PREPROCESSED: int i = INTEGER; 29 int i = INTEGER; // the value was exported, the macro was not. 30} 31