[clang] [clang] Check specialization for annotation (PR #117315)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 28 01:54:44 PST 2024
================
@@ -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
More information about the cfe-commits
mailing list