Bug in DoStmt?

class DoStmt
{
  //...
  virtual SourceRange getSourceRange() const {
    return SourceRange(DoLoc, SubExprs[BODY]->getLocEnd());

    IMHO this should be:
    return SourceRange(DoLoc, SubExprs[COND]->getLocEnd());
  }
  //...
};

Best,
Olaf Krzikalla

Olaf Krzikalla schrieb:

class DoStmt
{
  //...
  virtual SourceRange getSourceRange() const {
    return SourceRange(DoLoc, SubExprs[BODY]->getLocEnd());

    IMHO this should be:
    return SourceRange(DoLoc, SubExprs[COND]->getLocEnd());
  }
  //...
};

This still doesn't fix it as it doesn't include the final ");" in
do BODY while(COND);
Ideas?

Best
Olaf Krzikalla

Fixed here, thanks:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090608/018109.html

-Chris