[all-commits] [llvm/llvm-project] f91854: [clang][AMDGPU] Fix -ast-print crash on expanded p...

lijinpei-amd via All-commits all-commits at lists.llvm.org
Wed May 27 19:13:06 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9185454a9a70fd351cb8a1ba3b2b3e33e064c06
      https://github.com/llvm/llvm-project/commit/f9185454a9a70fd351cb8a1ba3b2b3e33e064c06
  Author: lijinpei-amd <jinpli at amd.com>
  Date:   2026-05-27 (Wed, 27 May 2026)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Sema/SemaObjC.h
    M clang/lib/Sema/SemaAMDGPU.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaExprObjC.cpp
    A clang/test/AST/ast-print-amdgcn-predicate.c

  Log Message:
  -----------
  [clang][AMDGPU] Fix -ast-print crash on expanded predicate builtins (#199963)

ExpandAMDGPUPredicateBuiltIn synthesized an IntegerLiteral typed
_Bool/bool — a shape no other producer creates, and one that
StmtPrinter::VisitIntegerLiteral has no case for. -ast-print on the
resulting if-condition hit llvm_unreachable.

Emit the canonical boolean literal instead:

- C++, C23, OpenCL, HIP: CXXBoolLiteralExpr 'bool'
- pre-C23 C: IntegerLiteral 'int'

In the C case this matches what <stdbool.h>'s true/false macros expand
to.

Fixes #199563



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