Ignore clang warnings related to property

两盒软妹~` 提交于 2019-12-02 03:39:50

问题


i want to ignore these warnings these warning appeared when i used valid architechtures : arm64 armv7 armv7s

these type of warnings appearing in many headers .

i want to ignore these warnings just like clang does for deprecated warnings.

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"

i want something like this or any compiler flags to ignore these warnings


回答1:


If you go to the log navigator (the last tab on the left panel in Xcode), you can expand the "transcripts" (see View and filter logs and reports). Once you find the one that shows the build warnings, you can see what the precise -W code for each is, and then suppress it via your #pragma.

Thus, in your revised question, you show us the -W code in question is -Wobjc-property-no-attribute. Thus you could do:

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-property-no-attribute"
...
#pragma clang diagnostic pop


来源:https://stackoverflow.com/questions/23859596/ignore-clang-warnings-related-to-property

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!