cppast icon indicating copy to clipboard operation
cppast copied to clipboard

Detect C++ language from compiler arguments

Open ArthurVasseur opened this issue 11 months ago • 0 comments

This PR improves C++ language detection by analyzing compiler arguments.

Before my PR, the language was detected by checking if "++" existed in the compiler name. This approach is incorrect in certain cases. https://github.com/standardese/cppast/blob/5329e377ab9b9ab9309e9641f3fcda04366a449a/src/libclang/libclang_parser.cpp#L232-L234 e.g my build utility xmake is only using clang not clang++ in the compile_commands.json and setting -std=c++20.

ArthurVasseur avatar Feb 08 '25 18:02 ArthurVasseur