From df000da850e9a679e74be35e263168ce3b5fa4c5 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 30 Jun 2010 21:40:01 +0000 Subject: [PATCH] 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 --- clang/tools/libclang/CIndexCodeCompletion.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/tools/libclang/CIndexCodeCompletion.cpp b/clang/tools/libclang/CIndexCodeCompletion.cpp index fa1fd915596f..277fadf683bc 100644 --- a/clang/tools/libclang/CIndexCodeCompletion.cpp +++ b/clang/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");