[all-commits] [llvm/llvm-project] 050b56: [Clang][Sema] Don't treat error-recovery dependenc...

Anirudh Mathur via All-commits all-commits at lists.llvm.org
Mon Sep 21 08:29:35 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 050b5650ff5c905a8d80beb31244c72f8551ba5b
      https://github.com/llvm/llvm-project/commit/050b5650ff5c905a8d80beb31244c72f8551ba5b
  Author: Anirudh Mathur <126768505+anirudhmathur12 at users.noreply.github.com>
  Date:   2026-09-21 (Mon, 21 Sep 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.md
    M clang/lib/Sema/SemaTemplate.cpp
    A clang/test/SemaCXX/GH220525.cpp

  Log Message:
  -----------
  [Clang][Sema] Don't treat error-recovery dependence as genuine template dependence in ActOnTag (#221440)

When a template argument fails to resolve (e.g. a namespace name used
where a value is expected), Sema substitutes a RecoveryExpr with a
dependent type so downstream code can recover gracefully. This
error-induced dependence was being conflated with genuine template
parameter dependence in ActOnTag's handling of TagUseKind::Reference/
Friend, causing computeDeclContext to report failure the same way it
would for an actually-dependent nested-name-specifier. This tripped an
assert in ActOnExplicitInstantiation that assumes dependent names can't
reach explicit instantiation, when in fact the diagnostic had already
been emitted at the point the RecoveryExpr was created.

Fixes #220525



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