HomePhabricator

Merge and improve code that detects same value in comparisons.

Authored by rtrieu on Sep 20 2019, 8:02 PM.

Description

Merge and improve code that detects same value in comparisons.

-Wtautological-overlap-compare and self-comparison from -Wtautological-compare
relay on detecting the same operand in different locations. Previously, each
warning had it's own operand checker. Now, both are merged together into
one function that each can call. The function also now looks through member
access and array accesses.

Differential Revision: https://reviews.llvm.org/D66045

llvm-svn: 372453

Details

Committed
rtrieuSep 20 2019, 8:02 PM
Differential Revision
D66045: Improve detection of same value in comparisons
Parents
rG27a803917181: Revert assertion added by r372394
Branches
Unknown
Tags
Unknown