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

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 07:30:44 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);
----------------
compnerd wrote:

This feels less readable :(

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


More information about the cfe-commits mailing list