Here's another one:

    T* p;
    ...
    if (A)
        p = &t;
    ...
    if (B)
        ... *p ...

B is true if and only if A is true. B can even be the same expression as A, such as a->b->c. Clang complains on the *p that p is "uninitialized".
...
At what point does this cease to be fixing "bugs" and become "contort to fit clang's quirks"?

Clang's static analysis isn't very mature yet.
Also Apple primarily pushes the Objective-C analysis development so they can integrate it into XCode.

Reply via email to