[all-commits] [llvm/llvm-project] d25919: [CIR] Fix operator-precedence bugs in assert condi...

Henrich Lauko via All-commits all-commits at lists.llvm.org
Fri Mar 6 14:08:19 PST 2026


  Branch: refs/heads/users/xlauko/cir-fix-always-passing-asserts
  Home:   https://github.com/llvm/llvm-project
  Commit: d2591938c4afdfd4fb3197db494d17423e0319b5
      https://github.com/llvm/llvm-project/commit/d2591938c4afdfd4fb3197db494d17423e0319b5
  Author: xlauko <xlauko at mail.muni.cz>
  Date:   2026-03-06 (Fri, 06 Mar 2026)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp
    M clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp

  Log Message:
  -----------
  [CIR] Fix operator-precedence bugs in assert conditions

Due to && binding tighter than ||, asserts of the form
assert(A || B && "msg") always pass when A is true. Add
parentheses so the string message is properly attached:
assert((A || B) && "msg").



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