libclang: When invoking external clang process to get code completion results,

pass -ccc-clang-cxx to force C++ support (even if the binary was built without
it).

llvm-svn: 107324
This commit is contained in:
Daniel Dunbar 2010-06-30 21:40:01 +00:00
parent db735cbbab
commit df000da850
1 changed files with 3 additions and 0 deletions

View File

@ -291,6 +291,9 @@ CXCodeCompleteResults *clang_codeComplete(CXIndex CIdx,
llvm::sys::Path ClangPath = CXXIdx->getClangPath();
argv.push_back(ClangPath.c_str());
// Always use Clang C++ support.
argv.push_back("-ccc-clang-cxx");
// Add the '-fsyntax-only' argument so that we only perform a basic
// syntax check of the code.
argv.push_back("-fsyntax-only");