Static analyzer gives no warnings in #included *.c files

$ cat foo.c
int foo( void ) {
    int x;
    if ( x ) return 1; /* uninitialized */
    return 0;
}

$ cat main.c
#include "foo.c" /* ignored by static analyzer? */
int main( void ) {
    return 0;
}

$ clang main.c --analyze
$ clang --version
clang version 3.1 (trunk 148340)

Analysis of main.c is defective. Explicit analysis of foo.c does give a warning.

$ clang foo.c --analyze
foo.c:3:10: warning: Branch condition evaluates to a garbage value
    if ( x ) return 1; /* uninitialized */
         ^
1 warning generated.

Robert P.