[all-commits] [llvm/llvm-project] 61f936: [clang] fix crash when evaluating __is_bitwise_clo...

Xinlong Chen via All-commits all-commits at lists.llvm.org
Fri Mar 13 00:45:22 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 61f936c8bfaeb63c58e40039aa4bb86797e998b0
      https://github.com/llvm/llvm-project/commit/61f936c8bfaeb63c58e40039aa4bb86797e998b0
  Author: Xinlong Chen <49522466+Xinlong-Chen at users.noreply.github.com>
  Date:   2026-03-13 (Fri, 13 Mar 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/AST/Type.cpp
    M clang/test/SemaCXX/builtin-is-bitwise-cloneable.cpp

  Log Message:
  -----------
  [clang] fix crash when evaluating __is_bitwise_cloneable on an invalid type (#183707)

fixes https://github.com/llvm/llvm-project/issues/183665

The crash was caused by `isBitwiseCloneableType` **infinitely
recursing** when a record type contains a self-referential field
produced by typo correction during error recovery (e.g. ABCD corrected
to ABC inside struct ABC).

This patch adds an early `RD->isInvalidDecl()` check to bail out before
recursing into fields and bases of invalid record declarations.



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