cppast
cppast copied to clipboard
Detect C++ language from compiler arguments
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.