diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-09-10 17:44:23 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-09-10 17:44:23 +0000 |
| commit | 7736e2ad987deae48db0c45e60e460eb730c16fe (patch) | |
| tree | b46c7c27be5f75612bc4bec78cd2f5a75da3afbb /clang/lib/AST/Expr.cpp | |
| parent | d5107d13336c0e019e8179ba2759b054377aa955 (diff) | |
| download | bcm5719-llvm-7736e2ad987deae48db0c45e60e460eb730c16fe.tar.gz bcm5719-llvm-7736e2ad987deae48db0c45e60e460eb730c16fe.zip | |
static_cast, reinterpret_cast, and const_cast can all be used in C++
integral constant expressions (for conversions to integer types,
naturally). I don't *think* that const_casts will ever get to this
point, but I also can't convince myself that they won't... so I've
taken the safe route and allowed the ICE checking code to look at
const_cast.
llvm-svn: 81453
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
| -rw-r--r-- | clang/lib/AST/Expr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index a90b9984d4b..2e2f35957c1 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -1464,7 +1464,10 @@ static ICEDiag CheckICE(const Expr* E, ASTContext &Ctx) { } case Expr::ImplicitCastExprClass: case Expr::CStyleCastExprClass: - case Expr::CXXFunctionalCastExprClass: { + case Expr::CXXFunctionalCastExprClass: + case Expr::CXXStaticCastExprClass: + case Expr::CXXReinterpretCastExprClass: + case Expr::CXXConstCastExprClass: { const Expr *SubExpr = cast<CastExpr>(E)->getSubExpr(); if (SubExpr->getType()->isIntegralType()) return CheckICE(SubExpr, Ctx); |

