forked from OSchip/llvm-project
A little more tweaking with StmtIterator and SizeOfAlignofExpr. A recent commit actually introduced a regression, not fixed a bug.
llvm-svn: 57282
This commit is contained in:
parent
9bb286ff43
commit
587a44fe3d
|
@ -1264,10 +1264,10 @@ Stmt::child_iterator SizeOfAlignOfTypeExpr::child_begin() {
|
|||
if (VariableArrayType* T = dyn_cast<VariableArrayType>(Ty.getTypePtr()))
|
||||
return child_iterator(T);
|
||||
else
|
||||
return child_iterator((VariableArrayType*)0);
|
||||
return child_iterator();
|
||||
}
|
||||
Stmt::child_iterator SizeOfAlignOfTypeExpr::child_end() {
|
||||
return child_iterator((VariableArrayType*)0);
|
||||
return child_iterator();
|
||||
}
|
||||
|
||||
// ArraySubscriptExpr
|
||||
|
|
|
@ -35,22 +35,25 @@ void StmtIteratorBase::NextVA() {
|
|||
p = FindVA(p->getElementType().getTypePtr());
|
||||
setVAPtr(p);
|
||||
|
||||
if (!p) {
|
||||
if (inDecl()) {
|
||||
if (VarDecl* VD = dyn_cast<VarDecl>(decl))
|
||||
if (VD->Init)
|
||||
return;
|
||||
|
||||
NextDecl();
|
||||
}
|
||||
else if (inDeclGroup()) {
|
||||
if (VarDecl* VD = dyn_cast<VarDecl>(*DGI))
|
||||
if (VD->Init)
|
||||
return;
|
||||
|
||||
NextDecl();
|
||||
}
|
||||
} else if (inSizeOfTypeVA()) {
|
||||
if (p)
|
||||
return;
|
||||
|
||||
if (inDecl()) {
|
||||
if (VarDecl* VD = dyn_cast<VarDecl>(decl))
|
||||
if (VD->Init)
|
||||
return;
|
||||
|
||||
NextDecl();
|
||||
}
|
||||
else if (inDeclGroup()) {
|
||||
if (VarDecl* VD = dyn_cast<VarDecl>(*DGI))
|
||||
if (VD->Init)
|
||||
return;
|
||||
|
||||
NextDecl();
|
||||
}
|
||||
else {
|
||||
assert (inSizeOfTypeVA());
|
||||
assert(!decl);
|
||||
RawVAPtr = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue