================
@@ -671,6 +684,10 @@ ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty,
 
   diagnoseNullableToNonnullConversion(Ty, E->getType(), E->getBeginLoc());
   diagnoseZeroToNullptrConversion(Kind, E);
+  if (!isCast(CCK) &&
+      !E->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull)) {
----------------
dougsonos wrote:

This seems to be causing some failed tests. `isNullPointerConstant` calls 
`Expr::EvaluateKnownConstInt` where this assertion fails:
```
  assert(!isValueDependent() &&
         "Expression evaluator can't be called on a dependent expression.");
```

https://github.com/llvm/llvm-project/pull/84983
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to