Skip to content

Instantly share code, notes, and snippets.

@edwardean
Forked from steipete/PSPDF_KEYPATH.m
Created February 6, 2018 05:50
Show Gist options
  • Save edwardean/29ce2f158eeea8291ddd2212f3ca9a19 to your computer and use it in GitHub Desktop.
Save edwardean/29ce2f158eeea8291ddd2212f3ca9a19 to your computer and use it in GitHub Desktop.
PSPDF_KEYPATH without all the warnings
#define PSPDF_KEYPATH(object, property) (^{ \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunreachable-code\"") \
_Pragma("clang diagnostic ignored \"-Wimplicit-retain-self\"") \
return ((void)(NO && ((void)object.property, NO)), @#property); \
_Pragma("clang diagnostic pop") \
}())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment