================ @@ -1763,6 +1763,18 @@ class Sema final : public SemaBase { /// Add [[gsl::Pointer]] attributes for std:: types. void inferGslPointerAttribute(TypedefNameDecl *TD); + template <typename T> static bool isRecordWithAttr(QualType Type) { ---------------- hokein wrote:
I'd avoid expose this function if possible (as it seems only be used in `CheckExprLifetime.cpp` and `isPointerLikeType`). How about? - we just keep the `isPointerLikeType` declaration in Sema.h - define `isPointerLikeType` in `CheckExprLifetime.cpp` - the `isRecordWithAttr` can still be in `CheckExprLifetime.cpp`. I think it is fine as `CheckExprLifetime.cpp` is a part of Sema library. 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