From: Daniel Dunbar Date: Wed, 30 Jun 2010 21:40:01 +0000 (+0000) Subject: libclang: When invoking external clang process to get code completion results, X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d9c6e1c97bdae6a9daedc6969bc839e93074b0f;p=clang 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107324 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/libclang/CIndexCodeCompletion.cpp b/tools/libclang/CIndexCodeCompletion.cpp index fa1fd91559..277fadf683 100644 --- a/tools/libclang/CIndexCodeCompletion.cpp +++ b/tools/libclang/CIndexCodeCompletion.cpp @@ -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");