Skip to content

Commit 4d72cdd

Browse files
committed
Added implementation of DiagnosticSeverity
Fixed generated access control
1 parent 0eb816d commit 4d72cdd

File tree

5 files changed

+296
-269
lines changed

5 files changed

+296
-269
lines changed

Sources/Clang/CTypes.swift

Lines changed: 55 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/// IMPORTANT: This file is automatically generated.
21
import cclang
2+
33
/// MARK: Special Types
4-
struct RecordType: ClangTypeBacked {
4+
public struct RecordType: ClangTypeBacked {
55
let clang: CXType
66
/// Computes the offset of a named field in a record of the given type
77
/// in bytes as it would be returned by __offsetof__ as per C++11[18.2p4]
@@ -21,6 +21,7 @@ struct RecordType: ClangTypeBacked {
2121
}
2222
return Int(val)
2323
}
24+
2425
/// Gathers and returns all the fields of this record.
2526
func fields() -> [Cursor] {
2627
let fields = Box([Cursor]())
@@ -41,212 +42,212 @@ struct RecordType: ClangTypeBacked {
4142
/// MARK: Standard Types
4243

4344
/// Represents an invalid type (e.g., where no type is available).
44-
struct InvalidType: ClangTypeBacked {
45+
public struct InvalidType: ClangTypeBacked {
4546
let clang: CXType
4647
}
4748
/// A type whose specific kind is not exposed via this interface.
48-
struct UnexposedType: ClangTypeBacked {
49+
public struct UnexposedType: ClangTypeBacked {
4950
let clang: CXType
5051
}
5152

52-
struct VoidType: ClangTypeBacked {
53+
public struct VoidType: ClangTypeBacked {
5354
let clang: CXType
5455
}
5556

56-
struct BoolType: ClangTypeBacked {
57+
public struct BoolType: ClangTypeBacked {
5758
let clang: CXType
5859
}
5960

60-
struct Char_UType: ClangTypeBacked {
61+
public struct Char_UType: ClangTypeBacked {
6162
let clang: CXType
6263
}
6364

64-
struct UCharType: ClangTypeBacked {
65+
public struct UCharType: ClangTypeBacked {
6566
let clang: CXType
6667
}
6768

68-
struct Char16Type: ClangTypeBacked {
69+
public struct Char16Type: ClangTypeBacked {
6970
let clang: CXType
7071
}
7172

72-
struct Char32Type: ClangTypeBacked {
73+
public struct Char32Type: ClangTypeBacked {
7374
let clang: CXType
7475
}
7576

76-
struct UShortType: ClangTypeBacked {
77+
public struct UShortType: ClangTypeBacked {
7778
let clang: CXType
7879
}
7980

80-
struct UIntType: ClangTypeBacked {
81+
public struct UIntType: ClangTypeBacked {
8182
let clang: CXType
8283
}
8384

84-
struct ULongType: ClangTypeBacked {
85+
public struct ULongType: ClangTypeBacked {
8586
let clang: CXType
8687
}
8788

88-
struct ULongLongType: ClangTypeBacked {
89+
public struct ULongLongType: ClangTypeBacked {
8990
let clang: CXType
9091
}
9192

92-
struct UInt128Type: ClangTypeBacked {
93+
public struct UInt128Type: ClangTypeBacked {
9394
let clang: CXType
9495
}
9596

96-
struct Char_SType: ClangTypeBacked {
97+
public struct Char_SType: ClangTypeBacked {
9798
let clang: CXType
9899
}
99100

100-
struct SCharType: ClangTypeBacked {
101+
public struct SCharType: ClangTypeBacked {
101102
let clang: CXType
102103
}
103104

104-
struct WCharType: ClangTypeBacked {
105+
public struct WCharType: ClangTypeBacked {
105106
let clang: CXType
106107
}
107108

108-
struct ShortType: ClangTypeBacked {
109+
public struct ShortType: ClangTypeBacked {
109110
let clang: CXType
110111
}
111112

112-
struct IntType: ClangTypeBacked {
113+
public struct IntType: ClangTypeBacked {
113114
let clang: CXType
114115
}
115116

116-
struct LongType: ClangTypeBacked {
117+
public struct LongType: ClangTypeBacked {
117118
let clang: CXType
118119
}
119120

120-
struct LongLongType: ClangTypeBacked {
121+
public struct LongLongType: ClangTypeBacked {
121122
let clang: CXType
122123
}
123124

124-
struct Int128Type: ClangTypeBacked {
125+
public struct Int128Type: ClangTypeBacked {
125126
let clang: CXType
126127
}
127128

128-
struct FloatType: ClangTypeBacked {
129+
public struct FloatType: ClangTypeBacked {
129130
let clang: CXType
130131
}
131132

132-
struct DoubleType: ClangTypeBacked {
133+
public struct DoubleType: ClangTypeBacked {
133134
let clang: CXType
134135
}
135136

136-
struct LongDoubleType: ClangTypeBacked {
137+
public struct LongDoubleType: ClangTypeBacked {
137138
let clang: CXType
138139
}
139140

140-
struct NullPtrType: ClangTypeBacked {
141+
public struct NullPtrType: ClangTypeBacked {
141142
let clang: CXType
142143
}
143144

144-
struct OverloadType: ClangTypeBacked {
145+
public struct OverloadType: ClangTypeBacked {
145146
let clang: CXType
146147
}
147148

148-
struct DependentType: ClangTypeBacked {
149+
public struct DependentType: ClangTypeBacked {
149150
let clang: CXType
150151
}
151152

152-
struct ObjCIdType: ClangTypeBacked {
153+
public struct ObjCIdType: ClangTypeBacked {
153154
let clang: CXType
154155
}
155156

156-
struct ObjCClassType: ClangTypeBacked {
157+
public struct ObjCClassType: ClangTypeBacked {
157158
let clang: CXType
158159
}
159160

160-
struct ObjCSelType: ClangTypeBacked {
161+
public struct ObjCSelType: ClangTypeBacked {
161162
let clang: CXType
162163
}
163164

164-
struct Float128Type: ClangTypeBacked {
165+
public struct Float128Type: ClangTypeBacked {
165166
let clang: CXType
166167
}
167168

168-
struct FirstBuiltinType: ClangTypeBacked {
169+
public struct FirstBuiltinType: ClangTypeBacked {
169170
let clang: CXType
170171
}
171172

172-
struct LastBuiltinType: ClangTypeBacked {
173+
public struct LastBuiltinType: ClangTypeBacked {
173174
let clang: CXType
174175
}
175176

176-
struct ComplexType: ClangTypeBacked {
177+
public struct ComplexType: ClangTypeBacked {
177178
let clang: CXType
178179
}
179180

180-
struct PointerType: ClangTypeBacked {
181+
public struct PointerType: ClangTypeBacked {
181182
let clang: CXType
182183
}
183184

184-
struct BlockPointerType: ClangTypeBacked {
185+
public struct BlockPointerType: ClangTypeBacked {
185186
let clang: CXType
186187
}
187188

188-
struct LValueReferenceType: ClangTypeBacked {
189+
public struct LValueReferenceType: ClangTypeBacked {
189190
let clang: CXType
190191
}
191192

192-
struct RValueReferenceType: ClangTypeBacked {
193+
public struct RValueReferenceType: ClangTypeBacked {
193194
let clang: CXType
194195
}
195196

196-
struct EnumType: ClangTypeBacked {
197+
public struct EnumType: ClangTypeBacked {
197198
let clang: CXType
198199
}
199200

200-
struct TypedefType: ClangTypeBacked {
201+
public struct TypedefType: ClangTypeBacked {
201202
let clang: CXType
202203
}
203204

204-
struct ObjCInterfaceType: ClangTypeBacked {
205+
public struct ObjCInterfaceType: ClangTypeBacked {
205206
let clang: CXType
206207
}
207208

208-
struct ObjCObjectPointerType: ClangTypeBacked {
209+
public struct ObjCObjectPointerType: ClangTypeBacked {
209210
let clang: CXType
210211
}
211212

212-
struct FunctionNoProtoType: ClangTypeBacked {
213+
public struct FunctionNoProtoType: ClangTypeBacked {
213214
let clang: CXType
214215
}
215216

216-
struct FunctionProtoType: ClangTypeBacked {
217+
public struct FunctionProtoType: ClangTypeBacked {
217218
let clang: CXType
218219
}
219220

220-
struct ConstantArrayType: ClangTypeBacked {
221+
public struct ConstantArrayType: ClangTypeBacked {
221222
let clang: CXType
222223
}
223224

224-
struct VectorType: ClangTypeBacked {
225+
public struct VectorType: ClangTypeBacked {
225226
let clang: CXType
226227
}
227228

228-
struct IncompleteArrayType: ClangTypeBacked {
229+
public struct IncompleteArrayType: ClangTypeBacked {
229230
let clang: CXType
230231
}
231232

232-
struct VariableArrayType: ClangTypeBacked {
233+
public struct VariableArrayType: ClangTypeBacked {
233234
let clang: CXType
234235
}
235236

236-
struct DependentSizedArrayType: ClangTypeBacked {
237+
public struct DependentSizedArrayType: ClangTypeBacked {
237238
let clang: CXType
238239
}
239240

240-
struct MemberPointerType: ClangTypeBacked {
241+
public struct MemberPointerType: ClangTypeBacked {
241242
let clang: CXType
242243
}
243244

244-
struct AutoType: ClangTypeBacked {
245+
public struct AutoType: ClangTypeBacked {
245246
let clang: CXType
246247
}
247248

248249
/// Represents a type that was referred to using an elaborated type keyword.
249-
struct ElaboratedType: ClangTypeBacked {
250+
public struct ElaboratedType: ClangTypeBacked {
250251
let clang: CXType
251252
}
252253

Sources/Clang/Cursor.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ extension Cursor {
187187
/// Retrieves all the children of the provided cursor.
188188
///
189189
/// - returns: An array of `Cursors` that are children of this cursor.
190-
func children() -> [Cursor] {
190+
public func children() -> [Cursor] {
191191
var children = [Cursor]()
192192
clang_visitChildrenWithBlock(asClang()) { child, _ in
193193
if let cursor = convertCursor(child) {
@@ -250,20 +250,20 @@ extension Cursor {
250250

251251
/// Given a cursor that represents a documentable entity (e.g.,
252252
/// declaration), return the associated parsed comment
253-
var fullComment: FullComment? {
253+
public var fullComment: FullComment? {
254254
return convertComment(clang_Cursor_getParsedComment(asClang())) as? FullComment
255255
}
256256

257257
/// Given a cursor that represents a declaration, return the associated
258258
/// comment text, including comment markers.
259-
var rawComment: String? {
259+
public var rawComment: String? {
260260
return clang_Cursor_getRawCommentText(asClang()).asSwiftOptional()
261261
}
262262

263263
/// Given a cursor that represents a documentable entity (e.g.,
264264
/// declaration), return the associated \brief paragraph; otherwise return
265265
/// the first paragraph.
266-
var briefComment: String? {
266+
public var briefComment: String? {
267267
return clang_Cursor_getBriefCommentText(asClang()).asSwiftOptional()
268268
}
269269

@@ -294,7 +294,7 @@ public enum VisibilityKind {
294294
/// Describes the kind of a template argument.
295295
/// See the definition of llvm::clang::TemplateArgument::ArgKind for full
296296
/// element descriptions.
297-
enum TemplateArgumentKind {
297+
public enum TemplateArgumentKind {
298298
case type
299299
case declaration
300300
case nullPtr

0 commit comments

Comments
 (0)