[all-commits] [llvm/llvm-project] bf6d24: [Clang] Do not defer variable template instantiati...

Younan Zhang via All-commits all-commits at lists.llvm.org
Wed May 21 23:06:13 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bf6d24a34db4c3d04beb188542e08e7852d9680f
      https://github.com/llvm/llvm-project/commit/bf6d24a34db4c3d04beb188542e08e7852d9680f
  Author: Younan Zhang <zyn7109 at gmail.com>
  Date:   2025-05-22 (Thu, 22 May 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/CodeGenCXX/cxx1z-inline-variables.cpp
    M clang/test/SemaTemplate/cxx17-inline-variables.cpp

  Log Message:
  -----------
  [Clang] Do not defer variable template instantiation for undeduced types (#141009)

The previous approach broke the instantiation convention for templated
substitutions, as we were attempting to instantiate the initializer
even when it was still dependent.

We deferred variable template instantiation until the end of the TU.
However, type deduction requires the initializer immediately,
similar to how constant evaluation does.

Fixes https://github.com/llvm/llvm-project/issues/140773
Fixes #135032
Fixes #134526

Reapplies https://github.com/llvm/llvm-project/pull/138122



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