Please sign in to comment.
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
- Loading branch information...
Showing with 249 additions and 35 deletions.
- +3 −0 clang/docs/ReleaseNotes.rst
- +5 −0 clang/include/clang/AST/Expr.h
- +105 −0 clang/lib/AST/Expr.cpp
- +16 −17 clang/lib/Analysis/CFG.cpp
- +13 −18 clang/lib/Sema/SemaExpr.cpp
- +6 −0 clang/test/Analysis/array-struct-region.cpp
- +14 −0 clang/test/Sema/warn-overlap.c
- +6 −0 clang/test/SemaCXX/compare-cxx2a.cpp
- +81 −0 clang/test/SemaCXX/self-comparison.cpp
Oops, something went wrong.