diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index f875ae365b892..9fd8741efc1cd 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/include/clang/AST/ASTContext.h @@ -3949,7 +3949,7 @@ OPT_LIST(V) std::vector findPFPFields(QualType Ty) const; bool hasPFPFields(QualType Ty) const; - bool isPFPField(const FieldDecl *Field) const; + static bool isPFPField(const FieldDecl *Field); /// Returns whether this record's PFP fields (if any) are trivially /// copyable (i.e. may be memcpy'd). This may also return true if the diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index b7e771595e86e..34a8610dda97e 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -15695,7 +15695,7 @@ bool ASTContext::hasPFPFields(QualType Ty) const { return !findPFPFields(Ty).empty(); } -bool ASTContext::isPFPField(const FieldDecl *FD) const { +bool ASTContext::isPFPField(const FieldDecl *FD) { if (auto *RD = dyn_cast(FD->getParent())) return RD->isPFPType() && FD->getType()->isPointerType() && !FD->hasAttr();