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

Mariya Podchishchaeva via All-commits all-commits at lists.llvm.org
Tue Feb 6 04:57:47 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a18e92d020b895b712175a3b13a3d021608115a7
      https://github.com/llvm/llvm-project/commit/a18e92d020b895b712175a3b13a3d021608115a7
  Author: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
  Date:   2024-02-06 (Tue, 06 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




More information about the All-commits mailing list