]> granicus.if.org Git - clang/commitdiff
libclang: When invoking external clang process to get code completion results,
authorDaniel Dunbar <daniel@zuster.org>
Wed, 30 Jun 2010 21:40:01 +0000 (21:40 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 30 Jun 2010 21:40:01 +0000 (21:40 +0000)
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

tools/libclang/CIndexCodeCompletion.cpp

index fa1fd915596fc215de2db253fef8764696c455a9..277fadf683bc7168a3e5712fcee8c6145d04b012 100644 (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");