[all-commits] [llvm/llvm-project] a8158d: [clang] Fix unexpected `-Wconstant-logical-operand...

Mariya Podchishchaeva via All-commits all-commits at lists.llvm.org
Fri Feb 9 13:21:15 PST 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: a8158d8836e94ede76ea0cc749da2583511b7d89
      https://github.com/llvm/llvm-project/commit/a8158d8836e94ede76ea0cc749da2583511b7d89
  Author: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
  Date:   2024-02-09 (Fri, 09 Feb 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/Sema/warn-int-in-bool-context.c

  Log Message:
  -----------
  [clang] Fix unexpected `-Wconstant-logical-operand` in C23 (#80724)

C23 has `bool`, but logical operators still return int. Check that
we're not in C to avoid false-positive -Wconstant-logical-operand.

Fixes https://github.com/llvm/llvm-project/issues/64356

(cherry picked from commit a18e92d020b895b712175a3b13a3d021608115a7)




More information about the All-commits mailing list