We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0ff36e commit e439d22Copy full SHA for e439d22
clang/lib/AST/ExprConstant.cpp
@@ -14014,8 +14014,8 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr(
14014
QualType Ty = E->getTypeOfArgument();
14015
// If the vector has a fixed size, we can determine the number of elements
14016
// at compile time.
14017
- if (Ty->isVectorType())
14018
- return Success(Ty->castAs<VectorType>()->getNumElements(), E);
+ if (const auto *VT = Ty->getAs<VectorType>())
+ return Success(VT->getNumElements(), E);
14019
14020
assert(Ty->isSizelessVectorType());
14021
if (Info.InConstantContext)
0 commit comments