[cfe-dev] SwitchCase and getNextSwitchCase()

George Kastrinis george.kastrinis at logicblox.com
Wed Sep 4 08:11:04 PDT 2013


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.

-- 

George Kastrinis
http://gkastrinis.info/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130904/5701d754/attachment.html>


More information about the cfe-dev mailing list