================ @@ -253,9 +253,12 @@ static void visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path, LocalVisitor Visit); template <typename T> static bool isRecordWithAttr(QualType Type) { - if (auto *RD = Type->getAsCXXRecordDecl()) - return RD->hasAttr<T>(); - return false; + auto *RD = Type->getAsCXXRecordDecl(); + if (!RD) + return false; + if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(RD)) + RD = CTSD->getSpecializedTemplate()->getTemplatedDecl(); ---------------- hokein wrote:
It would be nice if we have a testcase for this. I think we should find a way to reuse the `isPointerLikeType`, we have two duplicated version in clang now. (perhaps move it to `Sema.h`) https://github.com/llvm/llvm-project/pull/117315 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits