diff options
Diffstat (limited to 'lib/Expr/Parser.cpp')
-rw-r--r-- | lib/Expr/Parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Expr/Parser.cpp b/lib/Expr/Parser.cpp index 1808ca7b..c0cc05d5 100644 --- a/lib/Expr/Parser.cpp +++ b/lib/Expr/Parser.cpp @@ -947,8 +947,8 @@ ExprResult ParserImpl::ParseExtractParenExpr(const Token &Name, if (!OffsetExpr.isValid() || !Child.isValid()) return ConstantExpr::alloc(0, ResTy); - assert(OffsetExpr.get()->isConstant() && "ParseNumber returned non-constant."); - unsigned Offset = (unsigned) OffsetExpr.get()->getConstantValue(); + unsigned Offset = + (unsigned) cast<ConstantExpr>(OffsetExpr.get())->getConstantValue(); if (Offset + ResTy > Child.get()->getWidth()) { Error("extract out-of-range of child expression.", Name); |