[all-commits] [llvm/llvm-project] fd874e: Missing tautological compare warnings due to unary...
Muhammad Usman Shahid via All-commits
all-commits at lists.llvm.org
Fri Aug 19 07:48:17 PDT 2022
Author: Muhammad Usman Shahid <codesbyusman at gmail.com>
Date: 2022-08-19 (Fri, 19 Aug 2022)
Missing tautological compare warnings due to unary operators
The patch mainly focuses on the no warnings for -Wtautological-compare.
It work fine for the positive numbers but doesn't for the negative
numbers. This is because the warning explicitly checks for an
IntegerLiteral AST node, but -1 is represented by a UnaryOperator with
an IntegerLiteral sub-Expr.
Differential Revision: https://reviews.llvm.org/D130510
More information about the All-commits