Static analysis points out that on this line:
|
unsigned TkLen = Lexer::MeasureTokenLength(Node->getEndLoc(), SM, LangOpts); |
Lexer::MeasureTokenLength can return 0 and on the subsequent line TkLen - 1 will end up as max unsigned which does not look like the code would deal with that gracefully.
This was brought in via 6341301
It looks like the assumption is that this will never return zero, if that is the case there should be an assertion, something like assert(TkLen !=0); to document this invariant.