-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[clang-doc][NFC] Use LLVM style naming in YAMLGenerator.cpp #136393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) ChangesFull diff: https://github.com/llvm/llvm-project/pull/136393.diff 1 Files Affected:
diff --git a/clang-tools-extra/clang-doc/YAMLGenerator.cpp b/clang-tools-extra/clang-doc/YAMLGenerator.cpp
index ffabd2fd82229..1b741f52ea5e3 100644
--- a/clang-tools-extra/clang-doc/YAMLGenerator.cpp
+++ b/clang-tools-extra/clang-doc/YAMLGenerator.cpp
@@ -92,11 +92,11 @@ template <> struct ScalarTraits<std::array<unsigned char, 20>> {
std::array<unsigned char, 20> &Value) {
if (Scalar.size() != 40)
return "Error: Incorrect scalar size for USR.";
- Value = StringToSymbol(Scalar);
+ Value = stringToSymbol(Scalar);
return StringRef();
}
- static SymbolID StringToSymbol(llvm::StringRef Value) {
+ static SymbolID stringToSymbol(llvm::StringRef Value) {
SymbolID USR;
std::string HexString = fromHex(Value);
std::copy(HexString.begin(), HexString.end(), USR.begin());
@@ -108,17 +108,17 @@ template <> struct ScalarTraits<std::array<unsigned char, 20>> {
// Helper functions to map infos to YAML.
-static void TypeInfoMapping(IO &IO, TypeInfo &I) {
+static void typeInfoMapping(IO &IO, TypeInfo &I) {
IO.mapOptional("Type", I.Type, Reference());
}
-static void FieldTypeInfoMapping(IO &IO, FieldTypeInfo &I) {
- TypeInfoMapping(IO, I);
+static void fieldTypeInfoMapping(IO &IO, FieldTypeInfo &I) {
+ typeInfoMapping(IO, I);
IO.mapOptional("Name", I.Name, SmallString<16>());
IO.mapOptional("DefaultValue", I.DefaultValue, SmallString<16>());
}
-static void InfoMapping(IO &IO, Info &I) {
+static void infoMapping(IO &IO, Info &I) {
IO.mapRequired("USR", I.USR);
IO.mapOptional("Name", I.Name, SmallString<16>());
IO.mapOptional("Path", I.Path, SmallString<128>());
@@ -126,14 +126,14 @@ static void InfoMapping(IO &IO, Info &I) {
IO.mapOptional("Description", I.Description);
}
-static void SymbolInfoMapping(IO &IO, SymbolInfo &I) {
- InfoMapping(IO, I);
+static void symbolInfoMapping(IO &IO, SymbolInfo &I) {
+ infoMapping(IO, I);
IO.mapOptional("DefLocation", I.DefLoc, std::optional<Location>());
IO.mapOptional("Location", I.Loc, llvm::SmallVector<Location, 2>());
}
-static void RecordInfoMapping(IO &IO, RecordInfo &I) {
- SymbolInfoMapping(IO, I);
+static void recordInfoMapping(IO &IO, RecordInfo &I) {
+ symbolInfoMapping(IO, I);
IO.mapOptional("TagType", I.TagType);
IO.mapOptional("IsTypeDef", I.IsTypeDef, false);
IO.mapOptional("Members", I.Members);
@@ -148,7 +148,7 @@ static void RecordInfoMapping(IO &IO, RecordInfo &I) {
IO.mapOptional("Template", I.Template);
}
-static void CommentInfoMapping(IO &IO, CommentInfo &I) {
+static void commentInfoMapping(IO &IO, CommentInfo &I) {
IO.mapOptional("Kind", I.Kind, SmallString<16>());
IO.mapOptional("Text", I.Text, SmallString<64>());
IO.mapOptional("Name", I.Name, SmallString<16>());
@@ -185,12 +185,12 @@ template <> struct MappingTraits<Reference> {
};
template <> struct MappingTraits<TypeInfo> {
- static void mapping(IO &IO, TypeInfo &I) { TypeInfoMapping(IO, I); }
+ static void mapping(IO &IO, TypeInfo &I) { typeInfoMapping(IO, I); }
};
template <> struct MappingTraits<FieldTypeInfo> {
static void mapping(IO &IO, FieldTypeInfo &I) {
- TypeInfoMapping(IO, I);
+ typeInfoMapping(IO, I);
IO.mapOptional("Name", I.Name, SmallString<16>());
IO.mapOptional("DefaultValue", I.DefaultValue, SmallString<16>());
}
@@ -198,7 +198,7 @@ template <> struct MappingTraits<FieldTypeInfo> {
template <> struct MappingTraits<MemberTypeInfo> {
static void mapping(IO &IO, MemberTypeInfo &I) {
- FieldTypeInfoMapping(IO, I);
+ fieldTypeInfoMapping(IO, I);
// clang::AccessSpecifier::AS_none is used as the default here because it's
// the AS that shouldn't be part of the output. Even though AS_public is the
// default in the struct, it should be displayed in the YAML output.
@@ -209,7 +209,7 @@ template <> struct MappingTraits<MemberTypeInfo> {
template <> struct MappingTraits<NamespaceInfo> {
static void mapping(IO &IO, NamespaceInfo &I) {
- InfoMapping(IO, I);
+ infoMapping(IO, I);
IO.mapOptional("ChildNamespaces", I.Children.Namespaces,
std::vector<Reference>());
IO.mapOptional("ChildRecords", I.Children.Records,
@@ -221,12 +221,12 @@ template <> struct MappingTraits<NamespaceInfo> {
};
template <> struct MappingTraits<RecordInfo> {
- static void mapping(IO &IO, RecordInfo &I) { RecordInfoMapping(IO, I); }
+ static void mapping(IO &IO, RecordInfo &I) { recordInfoMapping(IO, I); }
};
template <> struct MappingTraits<BaseRecordInfo> {
static void mapping(IO &IO, BaseRecordInfo &I) {
- RecordInfoMapping(IO, I);
+ recordInfoMapping(IO, I);
IO.mapOptional("IsVirtual", I.IsVirtual, false);
// clang::AccessSpecifier::AS_none is used as the default here because it's
// the AS that shouldn't be part of the output. Even though AS_public is the
@@ -246,7 +246,7 @@ template <> struct MappingTraits<EnumValueInfo> {
template <> struct MappingTraits<EnumInfo> {
static void mapping(IO &IO, EnumInfo &I) {
- SymbolInfoMapping(IO, I);
+ symbolInfoMapping(IO, I);
IO.mapOptional("Scoped", I.Scoped, false);
IO.mapOptional("BaseType", I.BaseType);
IO.mapOptional("Members", I.Members);
@@ -255,7 +255,7 @@ template <> struct MappingTraits<EnumInfo> {
template <> struct MappingTraits<TypedefInfo> {
static void mapping(IO &IO, TypedefInfo &I) {
- SymbolInfoMapping(IO, I);
+ symbolInfoMapping(IO, I);
IO.mapOptional("Underlying", I.Underlying.Type);
IO.mapOptional("IsUsing", I.IsUsing, false);
}
@@ -263,7 +263,7 @@ template <> struct MappingTraits<TypedefInfo> {
template <> struct MappingTraits<FunctionInfo> {
static void mapping(IO &IO, FunctionInfo &I) {
- SymbolInfoMapping(IO, I);
+ symbolInfoMapping(IO, I);
IO.mapOptional("IsMethod", I.IsMethod, false);
IO.mapOptional("Parent", I.Parent, Reference());
IO.mapOptional("Params", I.Params);
@@ -298,13 +298,13 @@ template <> struct MappingTraits<TemplateInfo> {
};
template <> struct MappingTraits<CommentInfo> {
- static void mapping(IO &IO, CommentInfo &I) { CommentInfoMapping(IO, I); }
+ static void mapping(IO &IO, CommentInfo &I) { commentInfoMapping(IO, I); }
};
template <> struct MappingTraits<std::unique_ptr<CommentInfo>> {
static void mapping(IO &IO, std::unique_ptr<CommentInfo> &I) {
if (I)
- CommentInfoMapping(IO, *I);
+ commentInfoMapping(IO, *I);
}
};
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/35/builds/9333 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/24/builds/7544 Here is the relevant piece of the build log for the reference
|
No description provided.