Skip to content

Commit

Permalink
[clang] Fix unexpected -Wconstant-logical-operand in C23 (llvm#80724)
Browse files Browse the repository at this point in the history
C23 has `bool`, but logical operators still return int. Check that
we're not in C to avoid false-positive -Wconstant-logical-operand.

Fixes llvm#64356

(cherry picked from commit a18e92d)
  • Loading branch information
Fznamznon authored and Shivam Gupta committed Sep 5, 2024
1 parent b33fcf6 commit 55eb526
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ Bug Fixes in This Version
- Fixed a crash when diagnosing format strings and encountering an empty
delimited escape sequence (e.g., ``"\o{}"``). #GH102218

- Clang now doesn't produce false-positive warning `-Wconstant-logical-operand`
for logical operators in C23.
Fixes (`#64356 <https://github.com/llvm/llvm-project/issues/64356>`_).

Bug Fixes to Compiler Builtins
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit 55eb526

Please sign in to comment.