[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

Egor Zhdan via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 07:33:04 PDT 2024


================
@@ -1125,10 +1125,10 @@ class CommonTypeTableInfo
 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) +
-           1 + 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 +
+           getCommonTypeInfoSize(TI);
----------------
egorzhdan wrote:

Yeah, it's unfortunate that clang-format is overly strict about this. I can revert this and try to merge despite clang-format complaining, if you think that's better.

https://github.com/llvm/llvm-project/pull/90064


More information about the cfe-commits mailing list