[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 27 06:05:04 PDT 2024


================
@@ -9888,6 +9888,9 @@ static ExprResult convertVector(Expr *E, QualType ElementType, Sema &S) {
 /// IntTy without losing precision.
 static bool canConvertIntToOtherIntTy(Sema &S, ExprResult *Int,
                                       QualType OtherIntTy) {
+  if (Int->get()->isValueDependent())
+    return false;
----------------
cor3ntin wrote:

We probably want to check `containsError()` instead here

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


More information about the cfe-commits mailing list