I am trying to parse simple C++ class with CompilerInstance but get the following error;<br><br>E:/mycpp_vc/classtest.cpp:3:1: error: unknown type name 'class'<br>class Test<br>^<br>E:/mycpp_vc/classtest.cpp:3:13: error: expected ';' after top level declarator<br>
class Test<br>               ^<br>               ;<br>My understanding is clang assumes the file is a C file and hence the error.<br>I've thought clang would deduce that the file is a C++ by its extension.<br>I've also tried setting ci.getLangOpts().CPlusPlus=1 before parsing to no avail.<br>
<br>Is there something am I overlooking? <br>