libclang

Hi,

I had a question about libclang and Python. If I iterate about an cpp Code, I miss some Elements.

Some Example:

  • The following If/else condition is not in the AST

if (ameld->status1.bit.TYP == ZWEI_BIT_ABME)

*zustand = AUSSTELLUNG;

else

*zustand = 0;

My impression is, if the If-Condition == False, the total If/else condition do not in the AST.

So if I change the If-Condition for example in if(i==0)(If-condition == True), the total condition is in the AST and I can evaluate that.

Is that right, or get there another reason?

Is there an another chance, so that I can get the total if/else condition, no matter how the result from the if condition (True or False) was?

Regards

Janina Siemer

May be you can see this example CIrewriter.cpp at this page
https://github.com/loarabia/Clang-tutorial
<https://github.com/loarabia/Clang-tutorial>