#pragma clang attribute pop with no matching push

I have just upgraded a workspace from 8 to 9.1. It has a mixture of Objective-C and Swift.


I've gone through the changes to convert everything to Swift 4. The app builds and runs without error.


When I try to run the unit tests, I receive a compile error in my <module_name>-Swift.h generated file.


// Generated by Apple Swift version 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38)

#pragma clang diagnostic push

#pragma clang diagnostic ignored "-Wgcc-compat"

...

#if __has_attribute(external_source_symbol)

# define SWIFT_STRINGIFY(str) #str

# define SWIFT_MODULE_NAMESPACE_PUSH(module_name) _Pragma(SWIFT_STRINGIFY(clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in=module_name, generated_declaration))), apply_to=any(function, enum, objc_interface, objc_category, objc_protocol))))

# define SWIFT_MODULE_NAMESPACE_POP _Pragma("clang attribute pop")

#else

# define SWIFT_MODULE_NAMESPACE_PUSH(module_name)

# define SWIFT_MODULE_NAMESPACE_POP

#endif

...

SWIFT_MODULE_NAMESPACE_PUSH("<module_name>")

...

SWIFT_MODULE_NAMESPACE_POP

#pragma clang diagnostic pop


The line (in bold) above returns an error message that says: '#pragma clang attribute pop' with no matching '#pragma clang attribute push'



I'm using Xcode Version 9.1 (9B55)

Help me Apple Engineers. You're my only hope.

Help me Apple Engineers. You're my only hope.

If you’re looking for formal support here, you should open a DTS tech support incident so you discuss this with one of our tools experts.

Note Be aware that most of DTS, like much of Apple, is shut down in the observance of the US Thanksgiving holiday, so you won’t get a response until next week.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
#pragma clang attribute pop with no matching push
 
 
Q