g++/clang ultra fast parse but not compile mode?
문제
Is there some ultra fast "syntax check my code, but don't compile mode" for g++/clang? Where the only goal is to just check if the code I have is valid C++ code?
해결책
-fsyntax-only for GCC, this should probably work for Clang as well since they emulate GCC's command line options. Whether or not it's significantly faster, you'll have to time.
다른 팁
You can have a look at gcc-xml ( http://www.gccxml.org/HTML/Index.html ), which reuses the gcc frontend to produce an xml description of the source.
Another option is to use the edg frontend ( http://www.edg.com/index.php?location=c_frontend ), but is is not open source, and far from cheap.
Maybe cppcheck is an option for you? I do not know exactly what result you want. cppcheck is not a pure syntax check. And if cppcheck is fast enougth.