[clang] 7923040 - [clang][AST][NFC] Make ASTContext::isPFPField() static (#220265)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 9 03:35:05 PDT 2026
Author: Timm Baeder
Date: 2026-09-09T12:34:59+02:00
New Revision: 79230407a26e8d7de47e4c8e7b7f7b0d63bee00c
URL: https://github.com/llvm/llvm-project/commit/79230407a26e8d7de47e4c8e7b7f7b0d63bee00c
DIFF: https://github.com/llvm/llvm-project/commit/79230407a26e8d7de47e4c8e7b7f7b0d63bee00c.diff
LOG: [clang][AST][NFC] Make ASTContext::isPFPField() static (#220265)
Added:
Modified:
clang/include/clang/AST/ASTContext.h
clang/lib/AST/ASTContext.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index 90843f70aa9f0..5bb132f03db71 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -3967,7 +3967,7 @@ OPT_LIST(V)
std::vector<PFPField> 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 f4a63073aaed1..ad80074723817 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -15636,7 +15636,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<CXXRecordDecl>(FD->getParent()))
return RD->isPFPType() && FD->getType()->isPointerType() &&
!FD->hasAttr<NoFieldProtectionAttr>();
More information about the cfe-commits
mailing list