This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Add paranthesis around logical expression to silence -Wlogical-op-parentheses warning.
ClosedPublic

Authored by bgraur on Jul 13 2021, 6:04 AM.

Diff Detail

Event Timeline

bgraur created this revision.Jul 13 2021, 6:04 AM
bgraur requested review of this revision.Jul 13 2021, 6:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2021, 6:04 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
bgraur retitled this revision from Add paranthesis around logical expression to silence -Wlogical-op-parentheses warning. to [NFC] Add paranthesis around logical expression to silence -Wlogical-op-parentheses warning..Jul 13 2021, 6:06 AM
alexfh accepted this revision.Jul 13 2021, 6:36 AM

LG. I can commit the patch for you.

This revision is now accepted and ready to land.Jul 13 2021, 6:36 AM
This revision was landed with ongoing or failed builds.Jul 13 2021, 6:54 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Jul 13 2021, 7:16 AM

I think this is incorrect. See D105892 and https://reviews.llvm.org/D104915#2873851 . Don't blindly land changes to suppress warnings – the warnings exist to tell us something :)

I think this is incorrect. See D105892 and https://reviews.llvm.org/D104915#2873851 . Don't blindly land changes to suppress warnings – the warnings exist to tell us something :)

Indeed, thanks for pointing this out! On the other hand, it may be worth adding this warning with -Werror to the default set or at least enable it when running pre-merge checks.