[cfe-commits] [Patch] Fix off-by-one error in StringLiteral::getLocationOfByte, PR10223
hans at chromium.org
Wed Jun 29 11:56:51 PDT 2011
The attached patch fixes an off-by-one error in
StringLiteral::getLocationOfByte, exposed by PR10223.
I don't really know what's going on in this code, so it would be good
if someone could review.
It seems that TokNo == getNumConcatenated() would never be true,
because it's asserted earlier that TokNo < getNumConcatenated(). I
assume the author's intention was "TokNo is the last token", i.e.
TokNo == getNumConcatenated() - 1
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1056 bytes
Desc: not available
More information about the cfe-commits