Skip to content

Commit 87ea4b7

Browse files
committed
clang: update to clang v7
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent 0e8790f commit 87ea4b7

23 files changed

+1533
-918
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- "main"
1010

1111
env:
12-
LLVM_VERSION: 6
12+
LLVM_VERSION: 7
1313

1414
jobs:
1515
test:

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export CC := clang
44
export CXX := clang++
55

66
LLVM_LIBDIR?=$(shell llvm-config --libdir)
7-
LLVM_VERSION?=6
7+
LLVM_VERSION?=7
88

99
all: test
1010

clang/clang-c/BuildSystem.h

+15-15
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ extern "C" {
3030
*/
3131

3232
/**
33-
* \brief Return the timestamp for use with Clang's
33+
* Return the timestamp for use with Clang's
3434
* \c -fbuild-session-timestamp= option.
3535
*/
3636
CINDEX_LINKAGE unsigned long long clang_getBuildSessionTimestamp(void);
3737

3838
/**
39-
* \brief Object encapsulating information about overlaying virtual
39+
* Object encapsulating information about overlaying virtual
4040
* file/directories over the real file system.
4141
*/
4242
typedef struct CXVirtualFileOverlayImpl *CXVirtualFileOverlay;
4343

4444
/**
45-
* \brief Create a \c CXVirtualFileOverlay object.
45+
* Create a \c CXVirtualFileOverlay object.
4646
* Must be disposed with \c clang_VirtualFileOverlay_dispose().
4747
*
4848
* \param options is reserved, always pass 0.
@@ -51,7 +51,7 @@ CINDEX_LINKAGE CXVirtualFileOverlay
5151
clang_VirtualFileOverlay_create(unsigned options);
5252

5353
/**
54-
* \brief Map an absolute virtual file path to an absolute real one.
54+
* Map an absolute virtual file path to an absolute real one.
5555
* The virtual path must be canonicalized (not contain "."/"..").
5656
* \returns 0 for success, non-zero to indicate an error.
5757
*/
@@ -61,17 +61,17 @@ clang_VirtualFileOverlay_addFileMapping(CXVirtualFileOverlay,
6161
const char *realPath);
6262

6363
/**
64-
* \brief Set the case sensitivity for the \c CXVirtualFileOverlay object.
64+
* Set the case sensitivity for the \c CXVirtualFileOverlay object.
6565
* The \c CXVirtualFileOverlay object is case-sensitive by default, this
6666
* option can be used to override the default.
6767
* \returns 0 for success, non-zero to indicate an error.
6868
*/
6969
CINDEX_LINKAGE enum CXErrorCode
7070
clang_VirtualFileOverlay_setCaseSensitivity(CXVirtualFileOverlay,
71-
int caseSensitive);
71+
int caseSensitive);
7272

7373
/**
74-
* \brief Write out the \c CXVirtualFileOverlay object to a char buffer.
74+
* Write out the \c CXVirtualFileOverlay object to a char buffer.
7575
*
7676
* \param options is reserved, always pass 0.
7777
* \param out_buffer_ptr pointer to receive the buffer pointer, which should be
@@ -85,25 +85,25 @@ clang_VirtualFileOverlay_writeToBuffer(CXVirtualFileOverlay, unsigned options,
8585
unsigned *out_buffer_size);
8686

8787
/**
88-
* \brief free memory allocated by libclang, such as the buffer returned by
88+
* free memory allocated by libclang, such as the buffer returned by
8989
* \c CXVirtualFileOverlay() or \c clang_ModuleMapDescriptor_writeToBuffer().
9090
*
9191
* \param buffer memory pointer to free.
9292
*/
9393
CINDEX_LINKAGE void clang_free(void *buffer);
9494

9595
/**
96-
* \brief Dispose a \c CXVirtualFileOverlay object.
96+
* Dispose a \c CXVirtualFileOverlay object.
9797
*/
9898
CINDEX_LINKAGE void clang_VirtualFileOverlay_dispose(CXVirtualFileOverlay);
9999

100100
/**
101-
* \brief Object encapsulating information about a module.map file.
101+
* Object encapsulating information about a module.map file.
102102
*/
103103
typedef struct CXModuleMapDescriptorImpl *CXModuleMapDescriptor;
104104

105105
/**
106-
* \brief Create a \c CXModuleMapDescriptor object.
106+
* Create a \c CXModuleMapDescriptor object.
107107
* Must be disposed with \c clang_ModuleMapDescriptor_dispose().
108108
*
109109
* \param options is reserved, always pass 0.
@@ -112,23 +112,23 @@ CINDEX_LINKAGE CXModuleMapDescriptor
112112
clang_ModuleMapDescriptor_create(unsigned options);
113113

114114
/**
115-
* \brief Sets the framework module name that the module.map describes.
115+
* Sets the framework module name that the module.map describes.
116116
* \returns 0 for success, non-zero to indicate an error.
117117
*/
118118
CINDEX_LINKAGE enum CXErrorCode
119119
clang_ModuleMapDescriptor_setFrameworkModuleName(CXModuleMapDescriptor,
120120
const char *name);
121121

122122
/**
123-
* \brief Sets the umbrealla header name that the module.map describes.
123+
* Sets the umbrealla header name that the module.map describes.
124124
* \returns 0 for success, non-zero to indicate an error.
125125
*/
126126
CINDEX_LINKAGE enum CXErrorCode
127127
clang_ModuleMapDescriptor_setUmbrellaHeader(CXModuleMapDescriptor,
128128
const char *name);
129129

130130
/**
131-
* \brief Write out the \c CXModuleMapDescriptor object to a char buffer.
131+
* Write out the \c CXModuleMapDescriptor object to a char buffer.
132132
*
133133
* \param options is reserved, always pass 0.
134134
* \param out_buffer_ptr pointer to receive the buffer pointer, which should be
@@ -142,7 +142,7 @@ clang_ModuleMapDescriptor_writeToBuffer(CXModuleMapDescriptor, unsigned options,
142142
unsigned *out_buffer_size);
143143

144144
/**
145-
* \brief Dispose a \c CXModuleMapDescriptor object.
145+
* Dispose a \c CXModuleMapDescriptor object.
146146
*/
147147
CINDEX_LINKAGE void clang_ModuleMapDescriptor_dispose(CXModuleMapDescriptor);
148148

clang/clang-c/CXCompilationDatabase.h

+19-19
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extern "C" {
4040
typedef void * CXCompilationDatabase;
4141

4242
/**
43-
* \brief Contains the results of a search in the compilation database
43+
* Contains the results of a search in the compilation database
4444
*
4545
* When searching for the compile command for a file, the compilation db can
4646
* return several commands, as the file may have been compiled with
@@ -51,28 +51,28 @@ typedef void * CXCompilationDatabase;
5151
typedef void * CXCompileCommands;
5252

5353
/**
54-
* \brief Represents the command line invocation to compile a specific file.
54+
* Represents the command line invocation to compile a specific file.
5555
*/
5656
typedef void * CXCompileCommand;
5757

5858
/**
59-
* \brief Error codes for Compilation Database
59+
* Error codes for Compilation Database
6060
*/
6161
typedef enum {
6262
/*
63-
* \brief No error occurred
63+
* No error occurred
6464
*/
6565
CXCompilationDatabase_NoError = 0,
6666

6767
/*
68-
* \brief Database can not be loaded
68+
* Database can not be loaded
6969
*/
7070
CXCompilationDatabase_CanNotLoadDatabase = 1
7171

7272
} CXCompilationDatabase_Error;
7373

7474
/**
75-
* \brief Creates a compilation database from the database found in directory
75+
* Creates a compilation database from the database found in directory
7676
* buildDir. For example, CMake can output a compile_commands.json which can
7777
* be used to build the database.
7878
*
@@ -83,65 +83,65 @@ clang_CompilationDatabase_fromDirectory(const char *BuildDir,
8383
CXCompilationDatabase_Error *ErrorCode);
8484

8585
/**
86-
* \brief Free the given compilation database
86+
* Free the given compilation database
8787
*/
8888
CINDEX_LINKAGE void
8989
clang_CompilationDatabase_dispose(CXCompilationDatabase);
9090

9191
/**
92-
* \brief Find the compile commands used for a file. The compile commands
92+
* Find the compile commands used for a file. The compile commands
9393
* must be freed by \c clang_CompileCommands_dispose.
9494
*/
9595
CINDEX_LINKAGE CXCompileCommands
9696
clang_CompilationDatabase_getCompileCommands(CXCompilationDatabase,
9797
const char *CompleteFileName);
9898

9999
/**
100-
* \brief Get all the compile commands in the given compilation database.
100+
* Get all the compile commands in the given compilation database.
101101
*/
102102
CINDEX_LINKAGE CXCompileCommands
103103
clang_CompilationDatabase_getAllCompileCommands(CXCompilationDatabase);
104104

105105
/**
106-
* \brief Free the given CompileCommands
106+
* Free the given CompileCommands
107107
*/
108108
CINDEX_LINKAGE void clang_CompileCommands_dispose(CXCompileCommands);
109109

110110
/**
111-
* \brief Get the number of CompileCommand we have for a file
111+
* Get the number of CompileCommand we have for a file
112112
*/
113113
CINDEX_LINKAGE unsigned
114114
clang_CompileCommands_getSize(CXCompileCommands);
115115

116116
/**
117-
* \brief Get the I'th CompileCommand for a file
117+
* Get the I'th CompileCommand for a file
118118
*
119119
* Note : 0 <= i < clang_CompileCommands_getSize(CXCompileCommands)
120120
*/
121121
CINDEX_LINKAGE CXCompileCommand
122122
clang_CompileCommands_getCommand(CXCompileCommands, unsigned I);
123123

124124
/**
125-
* \brief Get the working directory where the CompileCommand was executed from
125+
* Get the working directory where the CompileCommand was executed from
126126
*/
127127
CINDEX_LINKAGE CXString
128128
clang_CompileCommand_getDirectory(CXCompileCommand);
129129

130130
/**
131-
* \brief Get the filename associated with the CompileCommand.
131+
* Get the filename associated with the CompileCommand.
132132
*/
133133
CINDEX_LINKAGE CXString
134134
clang_CompileCommand_getFilename(CXCompileCommand);
135135

136136
/**
137-
* \brief Get the number of arguments in the compiler invocation.
137+
* Get the number of arguments in the compiler invocation.
138138
*
139139
*/
140140
CINDEX_LINKAGE unsigned
141141
clang_CompileCommand_getNumArgs(CXCompileCommand);
142142

143143
/**
144-
* \brief Get the I'th argument value in the compiler invocations
144+
* Get the I'th argument value in the compiler invocations
145145
*
146146
* Invariant :
147147
* - argument 0 is the compiler executable
@@ -150,19 +150,19 @@ CINDEX_LINKAGE CXString
150150
clang_CompileCommand_getArg(CXCompileCommand, unsigned I);
151151

152152
/**
153-
* \brief Get the number of source mappings for the compiler invocation.
153+
* Get the number of source mappings for the compiler invocation.
154154
*/
155155
CINDEX_LINKAGE unsigned
156156
clang_CompileCommand_getNumMappedSources(CXCompileCommand);
157157

158158
/**
159-
* \brief Get the I'th mapped source path for the compiler invocation.
159+
* Get the I'th mapped source path for the compiler invocation.
160160
*/
161161
CINDEX_LINKAGE CXString
162162
clang_CompileCommand_getMappedSourcePath(CXCompileCommand, unsigned I);
163163

164164
/**
165-
* \brief Get the I'th mapped source content for the compiler invocation.
165+
* Get the I'th mapped source content for the compiler invocation.
166166
*/
167167
CINDEX_LINKAGE CXString
168168
clang_CompileCommand_getMappedSourceContent(CXCompileCommand, unsigned I);

clang/clang-c/CXErrorCode.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,38 +23,38 @@ extern "C" {
2323
#endif
2424

2525
/**
26-
* \brief Error codes returned by libclang routines.
26+
* Error codes returned by libclang routines.
2727
*
2828
* Zero (\c CXError_Success) is the only error code indicating success. Other
2929
* error codes, including not yet assigned non-zero values, indicate errors.
3030
*/
3131
enum CXErrorCode {
3232
/**
33-
* \brief No error.
33+
* No error.
3434
*/
3535
CXError_Success = 0,
3636

3737
/**
38-
* \brief A generic error code, no further details are available.
38+
* A generic error code, no further details are available.
3939
*
4040
* Errors of this kind can get their own specific error codes in future
4141
* libclang versions.
4242
*/
4343
CXError_Failure = 1,
4444

4545
/**
46-
* \brief libclang crashed while performing the requested operation.
46+
* libclang crashed while performing the requested operation.
4747
*/
4848
CXError_Crashed = 2,
4949

5050
/**
51-
* \brief The function detected that the arguments violate the function
51+
* The function detected that the arguments violate the function
5252
* contract.
5353
*/
5454
CXError_InvalidArguments = 3,
5555

5656
/**
57-
* \brief An AST deserialization error has occurred.
57+
* An AST deserialization error has occurred.
5858
*/
5959
CXError_ASTReadError = 4
6060
};

clang/clang-c/CXString.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extern "C" {
3030
*/
3131

3232
/**
33-
* \brief A character string.
33+
* A character string.
3434
*
3535
* The \c CXString type is used to return strings from the interface when
3636
* the ownership of that string might differ from one call to the next.
@@ -48,17 +48,17 @@ typedef struct {
4848
} CXStringSet;
4949

5050
/**
51-
* \brief Retrieve the character data associated with the given string.
51+
* Retrieve the character data associated with the given string.
5252
*/
5353
CINDEX_LINKAGE const char *clang_getCString(CXString string);
5454

5555
/**
56-
* \brief Free the given string.
56+
* Free the given string.
5757
*/
5858
CINDEX_LINKAGE void clang_disposeString(CXString string);
5959

6060
/**
61-
* \brief Free the given string set.
61+
* Free the given string set.
6262
*/
6363
CINDEX_LINKAGE void clang_disposeStringSet(CXStringSet *set);
6464

0 commit comments

Comments
 (0)