[all-commits] [llvm/llvm-project] c59378: [clang][CodeGen] Evaluate `typeid` operands which ...

Yanzuo Liu via All-commits all-commits at lists.llvm.org
Mon Jul 13 09:06:49 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c59378289002e1d12d649ef47708b900332141c7
      https://github.com/llvm/llvm-project/commit/c59378289002e1d12d649ef47708b900332141c7
  Author: Yanzuo Liu <zwuis at outlook.com>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp
    M clang/lib/CodeGen/CGExprCXX.cpp
    A clang/test/CIR/CodeGenCXX/typeid-most-derived.cpp
    M clang/test/CodeGenCXX/typeid-most-derived.cpp

  Log Message:
  -----------
  [clang][CodeGen] Evaluate `typeid` operands which are the most derived objects (#208470)

Before this patch, `typeid` operands are not evaluated if they are the
most derived objects.

Before #196544, only `typeid(non-reference-var)` is considered to be the
most derived object, which doesn't have side effects obviously. So there
was no miscompilation.

Fixes #202051.



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