I would like to restrict certain warnings to project includes, so system incl开发者_开发知识库udes are not checked. So:
/* I want no warnings from this include */
#include <myheader.h>
/* I want warnings from this include */
#include "myotherheader.h"
Is this possible with llvm and/or gcc?
Regards, Jochen
GCC already does this - you can specify additional directories to be considered as 'system directories' if you have some headers that you want to suppress warnings for:
- http://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
I don't really know about llvm/clang, but since clang has an option, -Wsystem-headers
, to enable warnings from system headers I'd assume it does something similar to GCC for system headers (i.e., suppress warnings for them).
精彩评论