================
@@ -4955,6 +4955,34 @@ const FieldDecl *FieldDecl::findCountedByField() const {
return dyn_cast<FieldDecl>(CountDecl);
}
+static bool InitializationHasSideEffects(const FieldDecl &FD) {
+ const Type *T = FD.getType()->getBaseElementTypeUnsafe();
+ // FIXME: Destruction of ObjC lifetime types has side-effects.
+ if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
+ return !RD->isCompleteDefinition() || !RD->hasTrivialDefaultConstructor()
||
+ !RD->hasTrivialDestructor();
+ return false;
+}
+
+template <typename AttrType> static bool HasAttribute(const QualType &T) {
----------------
tbaederr wrote:
```suggestion
template <typename AttrType> static bool hasAttribute(QualType T) {
```
https://github.com/llvm/llvm-project/pull/237374
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits