[all-commits] [llvm/llvm-project] 429484: [clang][ExprConst] Can't be past an invalid LValue...

Timm Baeder via All-commits all-commits at lists.llvm.org
Mon Mar 18 06:56:39 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4294841ebcbb22076a24267cdf5164c7aeed9941
      https://github.com/llvm/llvm-project/commit/4294841ebcbb22076a24267cdf5164c7aeed9941
  Author: Timm Baeder <tbaeder at redhat.com>
  Date:   2024-03-18 (Mon, 18 Mar 2024)

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/AST/Interp/c.c
    M clang/test/Sema/const-eval.c
    A clang/test/Sema/constexpr-void-cast.c

  Log Message:
  -----------
  [clang][ExprConst] Can't be past an invalid LValue designator (#84293)

For the test case in C, both `LV.getLValueOffset()` and
`Ctx.getTypeSizeInChars(Ty)` are zero, so we return `true` from
`isOnePastTheEndOfCompleteObject()` and ultimately diagnose this as
being one past the end, but the diagnostic doesn't make sense.



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