Static Ananlyze, dead store false positive

I'm playing with the last static analyzer (I'm always working with the svn trunk ;-)) and I'm scanning some of my projects.
I confirm that it is a very valuable tool.

I give you a fase positive (I think it 's one). It says I never read values out of keys, but I'm using it twice in the condition.

void DeadStoreTest(NSObject *anObject) {
   NSArray *keys;
  // analyze result: Although the value stored to 'keys' is used in the enclosing expression, the value is never actually read from 'keys'
   if ((keys = [anObject exposedBindings]) &&
       ([keys containsObject:@"name"] && [keys containsObject:@"icon"])) {
       // do something without keys

   }
}

testdead.m (248 Bytes)

This was a genuine bug in the Dead Stores checker, now fixed:

   http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080630/006378.html

For those not working with the SVN trunk, the fix should now be in checker-56 (on the Clang website).

BTW, this was an awesome test case. It nicely exercised a mishandled corner case in the analyzer's logic, which allowed me to quickly diagnose the problem. Thanks for providing it!

Ted