I use the following code to get source location:
sorry, the "44 1 45 4 => incorrect, should be 44 1 45 4 "
should be "44 1 45 4 => incorrect, should be 44 1 45 6"
A little of both, maybe.
Clang's "statement" doesn't include the semicolon (";") character, and
the end of a range is (generally) the first character of the last
token, leaving clients to do some work to add on the token length to
find the actual end position, and then to hunt for the semi-colon, if
the statement does in fact end in a semi-colon.
It might be nice to fix the range of statements to include the
semi-colon when that more accurately reflects the grammar, but doing
that systematically would run afoul of the Expr is-a Stmt decision,
and fixing that one is a somewhat large task.