SwitchCase and getNextSwitchCase()

Hi,

I’m looking at the SwitchCase in Clang and more specifically to the getNextSwitchCase method.
In the following example I would expect that for “case 0”, the method will return “case 3”.
What I get is the opposite though.

case 0:
case 3: a = 10;
break;

(I print the pointers for the current SwithcCase and the next)
For “case 0”

0x4c056f0
0x0
For “case 3”
0x4c05748
0x4c056f0

Am I understanding something in a wrong way or is that a bug perhaps?

Thanks.