Created
May 2, 2014 07:38
-
-
Save kyleve/373d7951baf9cea69584 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Allows easier pushing and popping of clang warnings. | |
Example (Ignoring undeclared selectors): | |
SQClangDiagnosticPushIgnored(-Wundeclared-selector); | |
SEL undeclaredSelector = @selector(thisSelectorDoesNotExist:::); | |
SQClangDiagnosticPop; | |
*/ | |
#define SQClangDiagnosticPush _Pragma("clang diagnostic push") | |
#define __SQStringifyMacro__(__String__) #__String__ | |
#define SQClangDiagnosticPushIgnored(IgnoredFlag) \ | |
SQClangDiagnosticPush \ | |
_Pragma(__SQStringifyMacro__(clang diagnostic ignored #IgnoredFlag)) | |
#define SQClangDiagnosticPop _Pragma("clang diagnostic pop") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment