[all-commits] [llvm/llvm-project] d444e3: [Clang][Sema] Fix crash in UnresolvedMemberExpr ch...

Chibuoyim (Wilson) Ogbonna via All-commits all-commits at lists.llvm.org
Fri Jul 17 03:28:44 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d444e3ebb8ae69cdb628be3b3b0c632f13df9a08
      https://github.com/llvm/llvm-project/commit/d444e3ebb8ae69cdb628be3b3b0c632f13df9a08
  Author: Chibuoyim (Wilson) Ogbonna <ogbonnachibuoyim12 at gmail.com>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.md
    M clang/lib/AST/ExprCXX.cpp
    M clang/test/SemaCXX/using-decl-templates.cpp

  Log Message:
  -----------
  [Clang][Sema] Fix crash in UnresolvedMemberExpr check (#209792)

This closes https://github.com/llvm/llvm-project/issues/209427

The test currently crashes because while iterating over the candidate
members of an unresolved member expression, `decl` is a `UsingShadowDecl`
with underlying decl as `UnresolvedUsingValueDecl`.

The current `isa<UnresolvedUsingValueDecl>(decl)` guard only checks the
outer `UsingShadowDecl` and misses the unresolved-using decl hidden
inside it, so `getAsFunction()` returns nullptr and
`cast<CXXMethodDecl>(nullptr)` asserts.
 
This patch checks the `UnresolvedUsingValueDecl` inside by calling
`getUnderlyingDecl()` before the guard.

This used to happen before a2794f9f363361f87a3538b90b78ff13381d5ce1.



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