Skip to content

Commit 709e355

Browse files
FznamznonShivam Gupta
authored and
Shivam Gupta
committed
[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 f3f9c3f commit 709e355

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@ Bug Fixes in This Version
317317
- Fixed a crash when diagnosing format strings and encountering an empty
318318
delimited escape sequence (e.g., ``"\o{}"``). #GH102218
319319

320+
- Clang now doesn't produce false-positive warning `-Wconstant-logical-operand`
321+
for logical operators in C23.
322+
Fixes (`#64356 <https://github.com/llvm/llvm-project/issues/64356>`_).
323+
320324
Bug Fixes to Compiler Builtins
321325
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
322326

0 commit comments

Comments
 (0)