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

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -