[clang] [sema] Improve -Wsign-compare (PR #65684)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 8 08:37:23 PDT 2023
================
@@ -14135,8 +14164,8 @@ static void AnalyzeComparison(Sema &S, BinaryOperator *E) {
// Go ahead and analyze implicit conversions in the operands. Note
// that we skip the implicit conversions on both sides.
- AnalyzeImplicitConversions(S, LHS, E->getOperatorLoc());
- AnalyzeImplicitConversions(S, RHS, E->getOperatorLoc());
+ AnalyzeImplicitConversions(LHS, E->getOperatorLoc(), false, false);
+ AnalyzeImplicitConversions(RHS, E->getOperatorLoc(), false, false);
----------------
shafik wrote:
```suggestion
AnalyzeImplicitConversions(LHS, E->getOperatorLoc(), /*IsInitList=*/false, /*IsTopLevelExpr=*/false);
AnalyzeImplicitConversions(RHS, E->getOperatorLoc(), /*IsInitList=*/false, /*IsTopLevelExpr=*/false);
```
https://github.com/llvm/llvm-project/pull/65684
More information about the cfe-commits
mailing list