[clang] [Clang] add user-level sizeless attribute (PR #71894)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 9 21:59:39 PST 2023
================
@@ -2400,7 +2402,66 @@ bool Type::isWebAssemblyTableType() const {
return false;
}
-bool Type::isSizelessType() const { return isSizelessBuiltinType(); }
+bool Type::isSizelessType() const {
+ // Check if this type or any of its constituents are sizeless, due to
+ // being a builtin type or individually having the user attribute.
+ // As structs can be recursive, we iterate through without repeats.
+ SmallVector<const Type *, 1> todo = {this};
----------------
tbaederr wrote:
```suggestion
SmallVector<const Type *, 1> Todo = {this};
```
https://github.com/llvm/llvm-project/pull/71894
More information about the cfe-commits
mailing list