The static analyzer is warning about a potential null dereference, but we should be able to use cast<MCConstantExpr> directly and if not assert will fire for us.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372956
91177308-0d34-0410-b5e6-
96231b3b80d8
// Make sure we have a number (false is returned if expression is a number)
if (!getParser().parseExpression(Value)) {
// Make sure this is a number that is in range
- const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(Value);
+ auto *MCE = cast<MCConstantExpr>(Value);
uint64_t IntValue = MCE->getValue();
if (!isUIntN(Size, IntValue) && !isIntN(Size, IntValue))
return Error(ExprLoc, "literal value out of range (256) for falign");