c++ - Clang Diagnostics, how to ignore compiler specific extensions -
my production code compiled on proprietary compiler language extensions, example:
__even_in_range(ta2iv, ta2iv_taifg); but using clang code analysis tool, , getting error error: use of undeclared identifier '__even_in_range'. there few more language extensions produce similar behavior. there way ask clang ignore identifiers?
edit: both of comments guided me towards define solution, added these compiler options code analysis package ( use https://github.com/lvzixun/clang-complete package).
-d __even_in_range(y,x)=y-d __interrupt=
this way none of sources influenced static analysis tool
thanks...
you can use predefined macro __clang_analyzer__ identify analyzer being run, , #define out extensions in case:
#ifdef __clang_analyzer__ #define __even_in_range(...) ... #endif details here, along other ideas rid of false positives.
Comments
Post a Comment