Make it clear that libclang does not modify the command-line arguments
it is given.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112717 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index 7e4902d..0716f82 100644
--- a/include/clang-c/Index.h
+++ b/include/clang-c/Index.h
@@ -645,7 +645,7 @@
CXIndex CIdx,
const char *source_filename,
int num_clang_command_line_args,
- const char **clang_command_line_args,
+ const char * const *clang_command_line_args,
unsigned num_unsaved_files,
struct CXUnsavedFile *unsaved_files);
@@ -779,7 +779,7 @@
*/
CINDEX_LINKAGE CXTranslationUnit clang_parseTranslationUnit(CXIndex CIdx,
const char *source_filename,
- const char **command_line_args,
+ const char * const *command_line_args,
int num_command_line_args,
struct CXUnsavedFile *unsaved_files,
unsigned num_unsaved_files,
@@ -2313,7 +2313,7 @@
CXCodeCompleteResults *clang_codeComplete(CXIndex CIdx,
const char *source_filename,
int num_command_line_args,
- const char **command_line_args,
+ const char * const *command_line_args,
unsigned num_unsaved_files,
struct CXUnsavedFile *unsaved_files,
const char *complete_filename,
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index d849186..af521e9 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -1434,7 +1434,7 @@
clang_createTranslationUnitFromSourceFile(CXIndex CIdx,
const char *source_filename,
int num_command_line_args,
- const char **command_line_args,
+ const char * const *command_line_args,
unsigned num_unsaved_files,
struct CXUnsavedFile *unsaved_files) {
return clang_parseTranslationUnit(CIdx, source_filename,
@@ -1446,7 +1446,7 @@
struct ParseTranslationUnitInfo {
CXIndex CIdx;
const char *source_filename;
- const char **command_line_args;
+ const char *const *command_line_args;
int num_command_line_args;
struct CXUnsavedFile *unsaved_files;
unsigned num_unsaved_files;
@@ -1458,7 +1458,7 @@
static_cast<ParseTranslationUnitInfo*>(UserData);
CXIndex CIdx = PTUI->CIdx;
const char *source_filename = PTUI->source_filename;
- const char **command_line_args = PTUI->command_line_args;
+ const char * const *command_line_args = PTUI->command_line_args;
int num_command_line_args = PTUI->num_command_line_args;
struct CXUnsavedFile *unsaved_files = PTUI->unsaved_files;
unsigned num_unsaved_files = PTUI->num_unsaved_files;
@@ -1712,7 +1712,7 @@
}
CXTranslationUnit clang_parseTranslationUnit(CXIndex CIdx,
const char *source_filename,
- const char **command_line_args,
+ const char * const *command_line_args,
int num_command_line_args,
struct CXUnsavedFile *unsaved_files,
unsigned num_unsaved_files,
diff --git a/tools/libclang/CIndexCodeCompletion.cpp b/tools/libclang/CIndexCodeCompletion.cpp
index fba317a..d591c5d 100644
--- a/tools/libclang/CIndexCodeCompletion.cpp
+++ b/tools/libclang/CIndexCodeCompletion.cpp
@@ -277,7 +277,7 @@
CXCodeCompleteResults *clang_codeComplete(CXIndex CIdx,
const char *source_filename,
int num_command_line_args,
- const char **command_line_args,
+ const char * const *command_line_args,
unsigned num_unsaved_files,
struct CXUnsavedFile *unsaved_files,
const char *complete_filename,