[all-commits] [llvm/llvm-project] 6db5f4: [Clang] Ignore empty FieldDecls when asking for th...

Bill Wendling via All-commits all-commits at lists.llvm.org
Tue Jul 23 00:50:08 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6db5f4fd2a287de9d20adc7a44cfcc66fc462c9c
      https://github.com/llvm/llvm-project/commit/6db5f4fd2a287de9d20adc7a44cfcc66fc462c9c
  Author: Bill Wendling <5993918+bwendling at users.noreply.github.com>
  Date:   2024-07-23 (Tue, 23 Jul 2024)

  Changed paths:
    M clang/lib/CodeGen/CGExpr.cpp
    M clang/lib/CodeGen/CGRecordLayout.h
    M clang/test/CodeGen/attr-counted-by.c

  Log Message:
  -----------
  [Clang] Ignore empty FieldDecls when asking for the field number (#100040)

A FieldDecl that's an empty struct may not show up in CGRecordLayout. Go
ahead and ignore such a field as it shouldn't make a difference to these
calculations.

Fixes: 1f6f97e2b64a ("[Clang] Loop over FieldDecls instead of all Decls (#99574)")
Co-authored-by: Eli Friedman <efriedma at quicinc.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list