I have added a couple more tests to D1259 with ternary and nested 
expressions, and they seem to work fine. The reason I don't need to handle 
non-directly nested expressions specially is that if a child of a conditional 
operator is anything else than an another conditional operator, it's value will 
be computed in the normal way and added to the environment. Conditional 
operators were the only problem, as they didn't store their values in the 
environment, but only "stored" them implicitly, in the structure of the CFG. 
This was possible because VisitLogicalExpr reconstructed the value by digging 
in the ExplodedGraph history. I wanted to store the values explicitly, because 
I will need them later, and the topmost logical expression seemed like the best 
place to do that, since it has access to all of the sub-expressions and is the 
point where all the CFG paths converge.

  PS: I did not add any new tests to this patch specifically, as this does not 
introduce any new features, and I am hoping that conditional expressions are 
covered enough already. If you think it's necessary, and can add a couple more 
here as well.

http://llvm-reviews.chandlerc.com/D1340
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to