In order to implement the static analyzer check in D5042 using ASTMatchers, I need the concept of a hasNextSibling() constraint.
The attached patch does not compile, but I'm wondering if I'm in the ballpark as far as implementation goes, or whether there is a better way to do this. (See the FIXME comments in the patch for what's not implemented.)
Also, it may make more sense to implement this as hasNextStatement() instead of a more generic "hasNextSibling()" because what I really want to match the next statement after the one I matched.