[clang] [clang][APINotes] Add support for the SwiftEscapable attribute (PR #115866)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 12 10:17:58 PST 2024


================
@@ -1266,11 +1266,11 @@ 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) +
-           2 + (TI.SwiftConformance ? TI.SwiftConformance->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.SwiftConformance ? TI.SwiftConformance->size() : 0) + 3 +
+           getCommonTypeInfoSize(TI);
----------------
Xazax-hun wrote:

I added clang format directives to prevent this from happening in the future. 

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


More information about the cfe-commits mailing list