Skip to content

Commit e1e5cc1

Browse files
ilovepiIanWood1
authored andcommitted
[clang-doc][NFC] Use LLVM style naming in YAMLGenerator.cpp (llvm#136393)
1 parent bb789a8 commit e1e5cc1

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

clang-tools-extra/clang-doc/YAMLGenerator.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ template <> struct ScalarTraits<std::array<unsigned char, 20>> {
9292
std::array<unsigned char, 20> &Value) {
9393
if (Scalar.size() != 40)
9494
return "Error: Incorrect scalar size for USR.";
95-
Value = StringToSymbol(Scalar);
95+
Value = stringToSymbol(Scalar);
9696
return StringRef();
9797
}
9898

99-
static SymbolID StringToSymbol(llvm::StringRef Value) {
99+
static SymbolID stringToSymbol(llvm::StringRef Value) {
100100
SymbolID USR;
101101
std::string HexString = fromHex(Value);
102102
std::copy(HexString.begin(), HexString.end(), USR.begin());
@@ -108,32 +108,32 @@ template <> struct ScalarTraits<std::array<unsigned char, 20>> {
108108

109109
// Helper functions to map infos to YAML.
110110

111-
static void TypeInfoMapping(IO &IO, TypeInfo &I) {
111+
static void typeInfoMapping(IO &IO, TypeInfo &I) {
112112
IO.mapOptional("Type", I.Type, Reference());
113113
}
114114

115-
static void FieldTypeInfoMapping(IO &IO, FieldTypeInfo &I) {
116-
TypeInfoMapping(IO, I);
115+
static void fieldTypeInfoMapping(IO &IO, FieldTypeInfo &I) {
116+
typeInfoMapping(IO, I);
117117
IO.mapOptional("Name", I.Name, SmallString<16>());
118118
IO.mapOptional("DefaultValue", I.DefaultValue, SmallString<16>());
119119
}
120120

121-
static void InfoMapping(IO &IO, Info &I) {
121+
static void infoMapping(IO &IO, Info &I) {
122122
IO.mapRequired("USR", I.USR);
123123
IO.mapOptional("Name", I.Name, SmallString<16>());
124124
IO.mapOptional("Path", I.Path, SmallString<128>());
125125
IO.mapOptional("Namespace", I.Namespace, llvm::SmallVector<Reference, 4>());
126126
IO.mapOptional("Description", I.Description);
127127
}
128128

129-
static void SymbolInfoMapping(IO &IO, SymbolInfo &I) {
130-
InfoMapping(IO, I);
129+
static void symbolInfoMapping(IO &IO, SymbolInfo &I) {
130+
infoMapping(IO, I);
131131
IO.mapOptional("DefLocation", I.DefLoc, std::optional<Location>());
132132
IO.mapOptional("Location", I.Loc, llvm::SmallVector<Location, 2>());
133133
}
134134

135-
static void RecordInfoMapping(IO &IO, RecordInfo &I) {
136-
SymbolInfoMapping(IO, I);
135+
static void recordInfoMapping(IO &IO, RecordInfo &I) {
136+
symbolInfoMapping(IO, I);
137137
IO.mapOptional("TagType", I.TagType);
138138
IO.mapOptional("IsTypeDef", I.IsTypeDef, false);
139139
IO.mapOptional("Members", I.Members);
@@ -148,7 +148,7 @@ static void RecordInfoMapping(IO &IO, RecordInfo &I) {
148148
IO.mapOptional("Template", I.Template);
149149
}
150150

151-
static void CommentInfoMapping(IO &IO, CommentInfo &I) {
151+
static void commentInfoMapping(IO &IO, CommentInfo &I) {
152152
IO.mapOptional("Kind", I.Kind, SmallString<16>());
153153
IO.mapOptional("Text", I.Text, SmallString<64>());
154154
IO.mapOptional("Name", I.Name, SmallString<16>());
@@ -185,20 +185,20 @@ template <> struct MappingTraits<Reference> {
185185
};
186186

187187
template <> struct MappingTraits<TypeInfo> {
188-
static void mapping(IO &IO, TypeInfo &I) { TypeInfoMapping(IO, I); }
188+
static void mapping(IO &IO, TypeInfo &I) { typeInfoMapping(IO, I); }
189189
};
190190

191191
template <> struct MappingTraits<FieldTypeInfo> {
192192
static void mapping(IO &IO, FieldTypeInfo &I) {
193-
TypeInfoMapping(IO, I);
193+
typeInfoMapping(IO, I);
194194
IO.mapOptional("Name", I.Name, SmallString<16>());
195195
IO.mapOptional("DefaultValue", I.DefaultValue, SmallString<16>());
196196
}
197197
};
198198

199199
template <> struct MappingTraits<MemberTypeInfo> {
200200
static void mapping(IO &IO, MemberTypeInfo &I) {
201-
FieldTypeInfoMapping(IO, I);
201+
fieldTypeInfoMapping(IO, I);
202202
// clang::AccessSpecifier::AS_none is used as the default here because it's
203203
// the AS that shouldn't be part of the output. Even though AS_public is the
204204
// default in the struct, it should be displayed in the YAML output.
@@ -209,7 +209,7 @@ template <> struct MappingTraits<MemberTypeInfo> {
209209

210210
template <> struct MappingTraits<NamespaceInfo> {
211211
static void mapping(IO &IO, NamespaceInfo &I) {
212-
InfoMapping(IO, I);
212+
infoMapping(IO, I);
213213
IO.mapOptional("ChildNamespaces", I.Children.Namespaces,
214214
std::vector<Reference>());
215215
IO.mapOptional("ChildRecords", I.Children.Records,
@@ -221,12 +221,12 @@ template <> struct MappingTraits<NamespaceInfo> {
221221
};
222222

223223
template <> struct MappingTraits<RecordInfo> {
224-
static void mapping(IO &IO, RecordInfo &I) { RecordInfoMapping(IO, I); }
224+
static void mapping(IO &IO, RecordInfo &I) { recordInfoMapping(IO, I); }
225225
};
226226

227227
template <> struct MappingTraits<BaseRecordInfo> {
228228
static void mapping(IO &IO, BaseRecordInfo &I) {
229-
RecordInfoMapping(IO, I);
229+
recordInfoMapping(IO, I);
230230
IO.mapOptional("IsVirtual", I.IsVirtual, false);
231231
// clang::AccessSpecifier::AS_none is used as the default here because it's
232232
// the AS that shouldn't be part of the output. Even though AS_public is the
@@ -246,7 +246,7 @@ template <> struct MappingTraits<EnumValueInfo> {
246246

247247
template <> struct MappingTraits<EnumInfo> {
248248
static void mapping(IO &IO, EnumInfo &I) {
249-
SymbolInfoMapping(IO, I);
249+
symbolInfoMapping(IO, I);
250250
IO.mapOptional("Scoped", I.Scoped, false);
251251
IO.mapOptional("BaseType", I.BaseType);
252252
IO.mapOptional("Members", I.Members);
@@ -255,15 +255,15 @@ template <> struct MappingTraits<EnumInfo> {
255255

256256
template <> struct MappingTraits<TypedefInfo> {
257257
static void mapping(IO &IO, TypedefInfo &I) {
258-
SymbolInfoMapping(IO, I);
258+
symbolInfoMapping(IO, I);
259259
IO.mapOptional("Underlying", I.Underlying.Type);
260260
IO.mapOptional("IsUsing", I.IsUsing, false);
261261
}
262262
};
263263

264264
template <> struct MappingTraits<FunctionInfo> {
265265
static void mapping(IO &IO, FunctionInfo &I) {
266-
SymbolInfoMapping(IO, I);
266+
symbolInfoMapping(IO, I);
267267
IO.mapOptional("IsMethod", I.IsMethod, false);
268268
IO.mapOptional("Parent", I.Parent, Reference());
269269
IO.mapOptional("Params", I.Params);
@@ -298,13 +298,13 @@ template <> struct MappingTraits<TemplateInfo> {
298298
};
299299

300300
template <> struct MappingTraits<CommentInfo> {
301-
static void mapping(IO &IO, CommentInfo &I) { CommentInfoMapping(IO, I); }
301+
static void mapping(IO &IO, CommentInfo &I) { commentInfoMapping(IO, I); }
302302
};
303303

304304
template <> struct MappingTraits<std::unique_ptr<CommentInfo>> {
305305
static void mapping(IO &IO, std::unique_ptr<CommentInfo> &I) {
306306
if (I)
307-
CommentInfoMapping(IO, *I);
307+
commentInfoMapping(IO, *I);
308308
}
309309
};
310310

0 commit comments

Comments
 (0)