github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h --
clang-tools-extra/clang-doc/BitcodeWriter.cpp
clang-tools-extra/clang-doc/JSONGenerator.cpp
clang-tools-extra/clang-doc/MDGenerator.cpp
clang-tools-extra/clang-doc/Representation.cpp
clang-tools-extra/clang-doc/Representation.h
clang-tools-extra/clang-doc/Serialize.cpp
clang-tools-extra/clang-doc/YAMLGenerator.cpp
clang-tools-extra/clang-doc/tool/ClangDocMain.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang-tools-extra/clang-doc/Representation.cpp
b/clang-tools-extra/clang-doc/Representation.cpp
index 0284f5a70..9c13f6bfa 100644
--- a/clang-tools-extra/clang-doc/Representation.cpp
+++ b/clang-tools-extra/clang-doc/Representation.cpp
@@ -224,32 +224,25 @@ llvm::Error mergeSingleInfo(doc::Info *&Reduced,
doc::Info *NewInfo,
std::move(*cast<NamespaceInfo>(NewInfo)));
break;
case InfoType::IT_record:
- cast<RecordInfo>(Reduced)->merge(
- std::move(*cast<RecordInfo>(NewInfo)));
+ cast<RecordInfo>(Reduced)->merge(std::move(*cast<RecordInfo>(NewInfo)));
break;
case InfoType::IT_enum:
- cast<EnumInfo>(Reduced)->merge(
- std::move(*cast<EnumInfo>(NewInfo)));
+ cast<EnumInfo>(Reduced)->merge(std::move(*cast<EnumInfo>(NewInfo)));
break;
case InfoType::IT_function:
- cast<FunctionInfo>(Reduced)->merge(
- std::move(*cast<FunctionInfo>(NewInfo)));
+
cast<FunctionInfo>(Reduced)->merge(std::move(*cast<FunctionInfo>(NewInfo)));
break;
case InfoType::IT_typedef:
- cast<TypedefInfo>(Reduced)->merge(
- std::move(*cast<TypedefInfo>(NewInfo)));
+ cast<TypedefInfo>(Reduced)->merge(std::move(*cast<TypedefInfo>(NewInfo)));
break;
case InfoType::IT_concept:
- cast<ConceptInfo>(Reduced)->merge(
- std::move(*cast<ConceptInfo>(NewInfo)));
+ cast<ConceptInfo>(Reduced)->merge(std::move(*cast<ConceptInfo>(NewInfo)));
break;
case InfoType::IT_variable:
- cast<VarInfo>(Reduced)->merge(
- std::move(*cast<VarInfo>(NewInfo)));
+ cast<VarInfo>(Reduced)->merge(std::move(*cast<VarInfo>(NewInfo)));
break;
case InfoType::IT_friend:
- cast<FriendInfo>(Reduced)->merge(
- std::move(*cast<FriendInfo>(NewInfo)));
+ cast<FriendInfo>(Reduced)->merge(std::move(*cast<FriendInfo>(NewInfo)));
break;
default:
return llvm::createStringError(llvm::inconvertibleErrorCode(),
diff --git a/clang-tools-extra/clang-doc/Representation.h
b/clang-tools-extra/clang-doc/Representation.h
index d135ba0cd..f074d627f 100644
--- a/clang-tools-extra/clang-doc/Representation.h
+++ b/clang-tools-extra/clang-doc/Representation.h
@@ -586,9 +586,7 @@ struct NamespaceInfo : public Info {
NamespaceInfo(SymbolID USR = SymbolID(), StringRef Name = StringRef(),
StringRef Path = StringRef());
- static bool classof(const Info *I) {
- return I->IT == InfoType::IT_namespace;
- }
+ static bool classof(const Info *I) { return I->IT == InfoType::IT_namespace;
}
void merge(NamespaceInfo &&I);
@@ -666,9 +664,7 @@ struct VarInfo : public SymbolInfo {
VarInfo() : SymbolInfo(InfoType::IT_variable) {}
explicit VarInfo(SymbolID USR) : SymbolInfo(InfoType::IT_variable, USR) {}
- static bool classof(const Info *I) {
- return I->IT == InfoType::IT_variable;
- }
+ static bool classof(const Info *I) { return I->IT == InfoType::IT_variable; }
void merge(VarInfo &&I);
@@ -681,9 +677,7 @@ struct FunctionInfo : public SymbolInfo {
FunctionInfo(SymbolID USR = SymbolID())
: SymbolInfo(InfoType::IT_function, USR) {}
- static bool classof(const Info *I) {
- return I->IT == InfoType::IT_function;
- }
+ static bool classof(const Info *I) { return I->IT == InfoType::IT_function; }
void merge(FunctionInfo &&I);
@@ -753,9 +747,7 @@ struct TypedefInfo : public SymbolInfo {
TypedefInfo(SymbolID USR = SymbolID())
: SymbolInfo(InfoType::IT_typedef, USR) {}
- static bool classof(const Info *I) {
- return I->IT == InfoType::IT_typedef;
- }
+ static bool classof(const Info *I) { return I->IT == InfoType::IT_typedef; }
void merge(TypedefInfo &&I);
@@ -843,9 +835,7 @@ struct ConceptInfo : public SymbolInfo {
ConceptInfo() : SymbolInfo(InfoType::IT_concept) {}
ConceptInfo(SymbolID USR) : SymbolInfo(InfoType::IT_concept, USR) {}
- static bool classof(const Info *I) {
- return I->IT == InfoType::IT_concept;
- }
+ static bool classof(const Info *I) { return I->IT == InfoType::IT_concept; }
void merge(ConceptInfo &&I);
``````````
</details>
https://github.com/llvm/llvm-project/pull/202059
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits