================
@@ -363,10 +363,14 @@ static bool implicitObjectParamIsLifetimeBound(const
FunctionDecl *FD) {
if (ATL.getAttrAs<LifetimeBoundAttr>())
return true;
}
-
return isNormalAsisgnmentOperator(FD);
}
+bool isFirstTemplateArgumentGSLPointer(const TemplateArgumentList &TAs) {
+ return TAs.size() > 0 && TAs[0].getKind() == TemplateArgument::Type &&
+ isRecordWithAttr<PointerAttr>(TAs[0].getAsType());
+}
+
----------------
usx95 wrote:
The motivation for checking this for first template args might not be
immediately clear without seeing the usage.
I would suggest moving the `CTSD->hasAttr<OwnerAttr>())` to this function and
have a function `isContainerOfPointer(ClassTemplateSpecializationDecl*)`
instead. Here we can document in this function that we are checking for
"Owner<Pointer, ...>"
https://github.com/llvm/llvm-project/pull/107213
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits