[all-commits] [llvm/llvm-project] a96725: [Clang] Correct the DeclRefExpr's Type after the i...

Younan Zhang via All-commits all-commits at lists.llvm.org
Thu Mar 27 04:40:24 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a9672515ce6b8b1bc6976ed1225f4fb4d53fa381
      https://github.com/llvm/llvm-project/commit/a9672515ce6b8b1bc6976ed1225f4fb4d53fa381
  Author: Younan Zhang <zyn7109 at gmail.com>
  Date:   2025-03-27 (Thu, 27 Mar 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/SemaCXX/cxx1y-variable-templates_top_level.cpp

  Log Message:
  -----------
  [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (#133212)

The instantiation of a VarDecl's initializer might be deferred until the
variable is actually used. However, we were still building the
DeclRefExpr with a type that could later be changed by the initializer's
instantiation, which is incorrect when incomplete arrays are involved.

Fixes #79750
Fixes #113936
Fixes #133047



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