how to use #pragma clang diagnostics

clang, diagnostics, pragma, xcode

Solution

Right click on the issue in the issue navigator and select "Reveal in Log". The error message will specify the warning.

Problem

I know that #pragma clang diagnostics can be used for ignoring some warnings generated by clang. But I don't know how to use this correctly. For example, for an unused variable warning we can avoid warning by ``` #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-variable" int number; #pragma clang diagnostic pop ``` But I don't know how to get correct parameter for #pragma clang diagnostic ignored ("-Wunused-variable" here) Is there any way to fing this kind of warning name for specific warnings with xcode?

Original source

Related problems