[flang-commits] [llvm] [libcxx] [clang] [flang] [libc] [clang-tools-extra] [compiler-rt] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)
Bill Wendling via flang-commits
flang-commits at lists.llvm.org
Tue Dec 12 11:37:24 PST 2023
================
@@ -876,31 +876,26 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type,
}
// Get the flexible array member Decl.
- const ValueDecl *FAMDecl = nullptr;
+ const RecordDecl *OuterRD = nullptr;
if (const auto *ME = dyn_cast<MemberExpr>(Base)) {
// Check if \p Base is referencing the FAM itself.
- if (const ValueDecl *MD = ME->getMemberDecl()) {
- const LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
- getLangOpts().getStrictFlexArraysLevel();
- if (!Decl::isFlexibleArrayMemberLike(
- Ctx, MD, MD->getType(), StrictFlexArraysLevel,
- /*IgnoreTemplateOrMacroSubstitution=*/true))
- return nullptr;
-
- FAMDecl = MD;
- }
+ if (const ValueDecl *VD = dyn_cast<FieldDecl>(ME->getMemberDecl()))
----------------
bwendling wrote:
That was an code-o. Fixed.
https://github.com/llvm/llvm-project/pull/73730
More information about the flang-commits
mailing list