Unable to force a clang CompilerInstance object to parse a header as C++ file
问题 I have a C++ header called class.h that I want to parse: class MyClass { public: Class() {} ~Class() {} bool isTrue() const; bool isFalse() const; private: bool m_attrib; }; bool MyClass::isTrue() const { return true; } bool MyClass::isFalse() const { return false; } I use clang a compiler Instance with an AST consumer. All my code works well with c source file. But I am unable to configure/force the langage that the CompilerInstance must use. Here is the code I use : m_ci = new clang: