[clang] [sema] Improve -Wsign-compare (PR #65684)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 8 08:37:24 PDT 2023


================
@@ -15423,29 +15489,29 @@ static void AnalyzeImplicitConversions(
     // FIXME: Use a more uniform representation for this.
     for (auto *SE : POE->semantics())
       if (auto *OVE = dyn_cast<OpaqueValueExpr>(SE))
-        WorkList.push_back({OVE->getSourceExpr(), CC, IsListInit});
+        WorkList.push_back({OVE->getSourceExpr(), CC, IsListInit, false});
   }
 
   // Skip past explicit casts.
   if (auto *CE = dyn_cast<ExplicitCastExpr>(E)) {
     E = CE->getSubExpr()->IgnoreParenImpCasts();
     if (!CE->getType()->isVoidType() && E->getType()->isAtomicType())
       S.Diag(E->getBeginLoc(), diag::warn_atomic_implicit_seq_cst);
-    WorkList.push_back({E, CC, IsListInit});
+    WorkList.push_back({E, CC, IsListInit, false});
----------------
shafik wrote:

```suggestion
    WorkList.push_back({E, CC, IsListInit, /*IsTopLevelExpr=*/false});
```

https://github.com/llvm/llvm-project/pull/65684


More information about the cfe-commits mailing list