[clang] [APINotes] Support C++ tag conformances to Swift protocols (PR #102664)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 9 12:16:50 PDT 2024
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 fb7028237bac1dccd328b6c3150e50e222a0879b 32d62daa94c30b1ddf95fc78e48866c8d4633bbb --extensions h,cpp -- clang/include/clang/APINotes/Types.h clang/lib/APINotes/APINotesFormat.h clang/lib/APINotes/APINotesReader.cpp clang/lib/APINotes/APINotesWriter.cpp clang/lib/APINotes/APINotesYAMLCompiler.cpp clang/lib/Sema/SemaAPINotes.cpp clang/test/APINotes/swift-import-as.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/APINotes/APINotesWriter.cpp b/clang/lib/APINotes/APINotesWriter.cpp
index d81bfd9f61..ccb2247dab 100644
--- a/clang/lib/APINotes/APINotesWriter.cpp
+++ b/clang/lib/APINotes/APINotesWriter.cpp
@@ -1186,11 +1186,11 @@ public:
class TagTableInfo : public CommonTypeTableInfo<TagTableInfo, TagInfo> {
public:
unsigned getUnversionedInfoSize(const TagInfo &TI) {
- return 2 + (TI.SwiftImportAs ? TI.SwiftImportAs->size() : 0) +
- 2 + (TI.SwiftRetainOp ? TI.SwiftRetainOp->size() : 0) +
- 2 + (TI.SwiftReleaseOp ? TI.SwiftReleaseOp->size() : 0) +
- 2 + (TI.SwiftConformsTo ? TI.SwiftConformsTo->size() : 0) +
- 2 + getCommonTypeInfoSize(TI);
+ return 2 + (TI.SwiftImportAs ? TI.SwiftImportAs->size() : 0) + 2 +
+ (TI.SwiftRetainOp ? TI.SwiftRetainOp->size() : 0) + 2 +
+ (TI.SwiftReleaseOp ? TI.SwiftReleaseOp->size() : 0) + 2 +
+ (TI.SwiftConformsTo ? TI.SwiftConformsTo->size() : 0) + 2 +
+ getCommonTypeInfoSize(TI);
}
void emitUnversionedInfo(raw_ostream &OS, const TagInfo &TI) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/102664
More information about the cfe-commits
mailing list