C++ perform type checking but do not compile file -
is there way type check c++ translation unit without compiling it, using either compiler driver clang or gcc or external tool. there lot of static analysis tools out there ... i'm wondering detecting type errors specifically, not (for instance) detecting questionable usage or undefined behavior.
the closest thing i've been able find this, generates assembly , writes /dev/null
, avoiding expensive code paths in compiler itself.
% clang++ -o- -s foo.cc > /dev/null
i'm wondering if there alternatives , pros/cons are.
g++ compiler flag: -fsyntax-only or flycheck
Comments
Post a Comment