[cfe-commits] [PATCH] In CFGBuilder, reverse the RHSBlock of LogicalOp && and ||

Ted Kremenek kremenek at apple.com
Fri Oct 3 22:42:52 PDT 2008


That's a subtle one.  Please apply immediately.

Thanks Zhongxing!

On Oct 3, 2008, at 9:06 PM, Zhongxing Xu wrote:

> [xing at nc8430 clang]$ svn diff
> Index: lib/AST/CFG.cpp
> ===================================================================
> --- lib/AST/CFG.cpp     (revision 57001)
> +++ lib/AST/CFG.cpp     (working copy)
> @@ -458,6 +458,7 @@
>          Succ = ConfluenceBlock;
>          Block = NULL;
>          CFGBlock* RHSBlock = Visit(B->getRHS());
> +        FinishBlock(RHSBlock);
>
>          // Now link the LHSBlock with RHSBlock.
>          if (B->getOpcode() == BinaryOperator::LOr) {
>
>
> Test case:
>
> void f() {
>   int i;
>   if (i >3 && (i < 10, i < 11)) {
>     i = 10;
>   }
> }
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list