diff options
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index b004bde7bd2..5107a5643c9 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -720,6 +720,13 @@ bool Expr::isIntegerConstantExpr(llvm::APSInt &Result, ASTContext &Ctx, Result.setIsUnsigned(!getType()->isSignedIntegerType()); break; } + case CXXBoolLiteralExprClass: { + const CXXBoolLiteralExpr *BL = cast<CXXBoolLiteralExpr>(this); + Result.zextOrTrunc(static_cast<uint32_t>(Ctx.getTypeSize(getType()))); + Result = BL->getValue(); + Result.setIsUnsigned(!getType()->isSignedIntegerType()); + break; + } case CXXZeroInitValueExprClass: Result.clear(); break; |