summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-06-30 21:40:01 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-06-30 21:40:01 +0000
commitdf000da850e9a679e74be35e263168ce3b5fa4c5 (patch)
tree7acb72fcb2e735718c6a147569f6b106feb5ff84
parentdb735cbbab902fdd517a829ed72c6587bceab29b (diff)
downloadbcm5719-llvm-df000da850e9a679e74be35e263168ce3b5fa4c5.tar.gz
bcm5719-llvm-df000da850e9a679e74be35e263168ce3b5fa4c5.zip
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
-rw-r--r--clang/tools/libclang/CIndexCodeCompletion.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndexCodeCompletion.cpp b/clang/tools/libclang/CIndexCodeCompletion.cpp
index fa1fd915596..277fadf683b 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");
OpenPOWER on IntegriCloud