'#pragma clang diagnostic' vs '#pragma clang ide'

已回答

In AppCode, How are these two related:

#pragma clang diagnostic

#pragma ide diagnostic

I am assuming the former is Xcode thing and the latter is an AppCode thing.

Is the latter to be surrounded with ‘clang push/pop’ or ‘ide push/pop’? 

is ‘ide push/pop’ even a thing?

Thanks...

 

 

0
Avatar
Permanently deleted user
正式评论

Hi Bruce.

Yes, #pragma clang diagnostic is a more general compiler thing (applicable to both Xcode and AppCode) while #pragma ide diagnostic is specific to JetBrains IDEs or IDEs based on them (AppCode/CLion/Android Studio). It's correct to surround diagnostic suppression statements with clang push/pop, there is no need for ide push/pop since clang push/pop covers it fully.

请先登录再写评论。