[all-commits] [llvm/llvm-project] 136f2b: [Clang][AST] Fix HandleLValueBase to deal with ref...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Thu May 15 16:04:58 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 136f2ba2a7bca015ef831c91fb0db5e5e31b7632
      https://github.com/llvm/llvm-project/commit/136f2ba2a7bca015ef831c91fb0db5e5e31b7632
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2025-05-15 (Thu, 15 May 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/SemaCXX/constant-expression-p2280r4.cpp

  Log Message:
  -----------
  [Clang][AST] Fix HandleLValueBase to deal with references (#140105)

Since P2280R4 Unknown references and pointers was implemented,
HandleLValueBase now has to deal with referneces:

D.MostDerivedType->getAsCXXRecordDecl()

will return a nullptr if D.MostDerivedType is a ReferenceType. The fix
is to use getNonReferenceType() to obtain the Pointee Type if we have a
reference.

Fixes: https://github.com/llvm/llvm-project/issues/139452



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