aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2010-08-13 01:36:11 +0000
committerEli Friedman <eli.friedman@gmail.com>2010-08-13 01:36:11 +0000
commitde7e66256b1bdfcf6526994825a8c8fced52a31c (patch)
tree4bad43ec14bf772db58bd501a5ca473a2a8c2f51 /lib/AST/ExprConstant.cpp
parent1e3a97c98a9ad099410fa5172ce8783baf0da0fd (diff)
Zap unused UnaryOperator::OffsetOf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r--lib/AST/ExprConstant.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 30234f5a78..3ef2a62e2d 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -1573,19 +1573,6 @@ bool IntExprEvaluator::VisitOffsetOfExpr(const OffsetOfExpr *E) {
}
bool IntExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) {
- // Special case unary operators that do not need their subexpression
- // evaluated. offsetof/sizeof/alignof are all special.
- if (E->isOffsetOfOp()) {
- // The AST for offsetof is defined in such a way that we can just
- // directly Evaluate it as an l-value.
- LValue LV;
- if (!EvaluateLValue(E->getSubExpr(), LV, Info))
- return false;
- if (LV.getLValueBase())
- return false;
- return Success(LV.getLValueOffset().getQuantity(), E);
- }
-
if (E->getOpcode() == UnaryOperator::LNot) {
// LNot's operand isn't necessarily an integer, so we handle it specially.
bool bres;
@@ -2495,8 +2482,6 @@ static ICEDiag CheckICE(const Expr* E, ASTContext &Ctx) {
case UnaryOperator::Real:
case UnaryOperator::Imag:
return CheckICE(Exp->getSubExpr(), Ctx);
- case UnaryOperator::OffsetOf:
- break;
}
// OffsetOf falls through here.