When using Xcode parsing (product> parsing), is there a way to ignore any errors in a given file?

When using Xcode parsing (product> parsing), is there a way to ignore any errors in a given file?

For example, a pragma or something?

We just want to ignore any warnings about third-party code, so that it becomes more obvious to us when there was a problem in our code.

thanks

+4
source share
2 answers

As suggested by Matthew:

#ifndef __clang_analyzer__ ... #endif 
+1
source
 #pragma clang diagnostic ignored "-Wall" 

See the clang user guide for other useful #pragmas for clang.

This also works for GCC.

 #pragma GCC diagnostic ignored "-Wall" 
+1
source

All Articles