================
@@ -11679,6 +11500,15 @@ static std::optional<IntRange>
TryGetExprRange(ASTContext &C, const Expr *E,
Approximate);
}
+ QualType T = E->getType();
+ if (const auto *VT = T->getAs<VectorType>()) {
+ QualType ElemTy = VT->getElementType();
+ if (ElemTy->isUnsignedIntegerType()) {
+ return TryGetExprRange(C, UO->getSubExpr(), MaxWidth,
+ InConstantContext, Approximate);
+ }
+ }
+
----------------
YutongZhuu wrote:
Thanks for the suggestion. I implemented a small helper function in this file
to deduplicate the type checking logic in this change. Let me know what do you
like the current implementation.
https://github.com/llvm/llvm-project/pull/182627
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits