[libclang] Remove the 'extern "C"' blocks from the implementation files.
These are unnecessary, the declarations already carry the 'extern C' property, and if there is mismatch
between declaration and definition then we will get linker errors via libclang.exports.
llvm-svn: 290025
diff --git a/clang/tools/libclang/CIndexCodeCompletion.cpp b/clang/tools/libclang/CIndexCodeCompletion.cpp
index 344ed27..12895c4 100644
--- a/clang/tools/libclang/CIndexCodeCompletion.cpp
+++ b/clang/tools/libclang/CIndexCodeCompletion.cpp
@@ -53,8 +53,6 @@
using namespace clang;
using namespace clang::cxindex;
-extern "C" {
-
enum CXCompletionChunkKind
clang_getCompletionChunkKind(CXCompletionString completion_string,
unsigned chunk_number) {
@@ -346,8 +344,6 @@
fprintf(stderr, "--- %u completion results\n",
--CodeCompletionResultObjects);
}
-
-} // end extern "C"
static unsigned long long getContextsForContextKind(
enum CodeCompletionContext::Kind kind,
@@ -794,7 +790,6 @@
return Results;
}
-extern "C" {
CXCodeCompleteResults *clang_codeCompleteAt(CXTranslationUnit TU,
const char *complete_filename,
unsigned complete_line,
@@ -916,8 +911,6 @@
return cxstring::createDup(Results->Selector);
}
-} // end extern "C"
-
/// \brief Simple utility function that appends a \p New string to the given
/// \p Old string, using the \p Buffer for storage.
///
@@ -990,9 +983,7 @@
};
}
-extern "C" {
- void clang_sortCodeCompletionResults(CXCompletionResult *Results,
- unsigned NumResults) {
- std::stable_sort(Results, Results + NumResults, OrderCompletionResults());
- }
+void clang_sortCodeCompletionResults(CXCompletionResult *Results,
+ unsigned NumResults) {
+ std::stable_sort(Results, Results + NumResults, OrderCompletionResults());
}