summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-06-06 20:45:41 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-06-06 20:45:41 +0000
commit40ed29730b2656796cd6085148f7aef1886040cf (patch)
tree939094a1639d8564f8e5044bef548315b588ff32 /clang/lib/AST/ExprConstant.cpp
parent3f87e3b7073a954b9f1a600e0cf8149e1e043134 (diff)
downloadbcm5719-llvm-40ed29730b2656796cd6085148f7aef1886040cf.tar.gz
bcm5719-llvm-40ed29730b2656796cd6085148f7aef1886040cf.zip
Revert Decl's iterators back to pointer value_type rather than reference value_type
In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r--clang/lib/AST/ExprConstant.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index d3ab84fc4a8..e9cce9f23ae 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -3418,7 +3418,7 @@ static bool HandleClassZeroInitialization(EvalInfo &Info, const Expr *E,
continue;
LValue Subobject = This;
- if (!HandleLValueMember(Info, E, Subobject, &*I, &Layout))
+ if (!HandleLValueMember(Info, E, Subobject, *I, &Layout))
return false;
ImplicitValueInitExpr VIE(I->getType());
@@ -3443,9 +3443,9 @@ bool RecordExprEvaluator::ZeroInitialization(const Expr *E) {
}
LValue Subobject = This;
- if (!HandleLValueMember(Info, E, Subobject, &*I))
+ if (!HandleLValueMember(Info, E, Subobject, *I))
return false;
- Result = APValue(&*I);
+ Result = APValue(*I);
ImplicitValueInitExpr VIE(I->getType());
return EvaluateInPlace(Result.getUnionValue(), Info, Subobject, &VIE);
}
@@ -3536,7 +3536,7 @@ bool RecordExprEvaluator::VisitInitListExpr(const InitListExpr *E) {
// FIXME: Diagnostics here should point to the end of the initializer
// list, not the start.
if (!HandleLValueMember(Info, HaveInit ? E->getInit(ElementNo) : E,
- Subobject, &*Field, &Layout))
+ Subobject, *Field, &Layout))
return false;
// Perform an implicit value-initialization for members beyond the end of
OpenPOWER on IntegriCloud