Help required to use clang analizer

I am trying to use clang analyzer using the below command.

clang -cc1 -analyze -analyzer-checker=alpha.core test.c

I am getting the following error.

test.c:1:10: fatal error: ‘sys/stat.h’ file not found

#include <sys/stat.h>


1 error generated.

If I use the command,

clang test.c
there is no error.

Please help me to solve the error.