Open VenoVeno opened 7 months ago
C and C++. For c++, up to C++17 partially. The parser can detect some compiler variations in order to support different "built-in" functions, etc. The main compiler variations supported are GCC and Clang, with some basic support for MSVC and ClangCl. One thing to note is that the parser does not distinguish c++ version. For example, if a new C++17 specification/behavior is implemented that is not simultaneously compatible with parsing c++14 code, the parser will only handle the c++17 way.
The main compiler variations supported are GCC and Clang.
Does it support Clang? But i could see only parser available for GCC and GPP standards?
some basic support for MSVC and ClangCl
Do we have to set any additional flags to recognise and parse for MSVC and ClangCl?
The GPP parser supports GCC, Clang, MSVC, ClangCl variants by checking the macros __GNUC__, __GNUC_MINOR__, __clang__, _MSC_VER
. The GPP parser could be split into multiple parsers to isolate each but it has not been done.
Means, currently the parser couldn't recognise different version of __GNUC__ and __GNUC_MINOR__
?
The parser can recognize different versions of __GNUC__
and __GNUC_MINOR__
and adjust some things like which built-in functions can be parsed. What I meant is that you might run into some cases that the parser will be more permissive than it should because for both Clang (__clang__
) and MSVC (_MSC_VER
) compiler support, it uses much of the same parser code under the hood. So for example, when parsing in MSVC mode, it might wrongly accept GCC-specific syntax.
Sorry for being unclear.
Hi, Eclipse CDT parsed source code by constructing AST. What are all the languages supported like C, C++, Clang.
Thanks, Veno.