uint32_t Bits = 0;
bool hasMacroDefinition
= II->hasMacroDefinition() &&
- (Macro || (Macro = PP.getMacroInfo(II))) && !Macro->isBuiltinMacro();
+ (Macro || (Macro = PP.getMacroInfo(II))) && !Macro->isBuiltinMacro() &&
+ (!IsModule || Macro->isExported());
Bits = (uint32_t)II->getObjCOrBuiltinID();
Bits = (Bits << 1) | unsigned(hasMacroDefinition);
Bits = (Bits << 1) | unsigned(II->isExtensionToken());
#__export_macro__ INTEGER
#__export_macro__ DOUBLE
+int (INTEGER);
+
#else
__import_module__ macros;
#__export_macro__ WIBBLE // expected-error{{no macro named 'WIBBLE' to export}}
+void f() {
+ int i = INTEGER; // the value was exported, the macro was not.
+}
#endif