For CLANG, this works:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// Here I like to leave a comment to my future self to explain why I need this deprecated call
NSString *myUDID = [[UIDevice currentDevice] uniqueIdentifier];
#pragma clang diagnostic pop
You can use it inside a method, which allows you to be very specific about the line that causes the warning you want to have ignored.