summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/tools/libclang/CIndexCodeCompletion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/tools/libclang/CIndexCodeCompletion.cpp')
-rw-r--r--contrib/llvm/tools/clang/tools/libclang/CIndexCodeCompletion.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/tools/libclang/CIndexCodeCompletion.cpp b/contrib/llvm/tools/clang/tools/libclang/CIndexCodeCompletion.cpp
index 481a375..277fadf 100644
--- a/contrib/llvm/tools/clang/tools/libclang/CIndexCodeCompletion.cpp
+++ b/contrib/llvm/tools/clang/tools/libclang/CIndexCodeCompletion.cpp
@@ -202,7 +202,7 @@ unsigned clang_getNumCompletionChunks(CXCompletionString completion_string) {
unsigned clang_getCompletionPriority(CXCompletionString completion_string) {
CXStoredCodeCompletionString *CCStr
= (CXStoredCodeCompletionString *)completion_string;
- return CCStr? CCStr->getPriority() : CCP_Unlikely;
+ return CCStr? CCStr->getPriority() : unsigned(CCP_Unlikely);
}
static bool ReadUnsigned(const char *&Memory, const char *MemoryEnd,
@@ -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