Use NSInvocation instead of diagnostic ignoring pragmas.