Skip to content

Commit 0e39e35

Browse files
Fznamznonxgupta
authored andcommitted
[clang] Fix unexpected -Wconstant-logical-operand in C23 (llvm#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 llvm#64356 (cherry picked from commit a18e92d)
1 parent c669eaf commit 0e39e35

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/docs/ReleaseNotes.rst

+4
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,10 @@ Bug Fixes in This Version
911911
- Fixed the definition of ``ATOMIC_FLAG_INIT`` in ``<stdatomic.h>`` so it can
912912
be used in C++.
913913

914+
- Clang now doesn't produce false-positive warning `-Wconstant-logical-operand`
915+
for logical operators in C23.
916+
Fixes (`#64356 <https://github.com/llvm/llvm-project/issues/64356>`_).
917+
914918
Bug Fixes to Compiler Builtins
915919
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
916920

0 commit comments

Comments
 (0)