scan-build make does not detect any bugs
问题 I have a very simple .c file, with some obvious bugs inside it. #include <stdio.h> struct S { int x; }; void f(struct S s){ } void test() { struct S s; f(s); // warn } int test2(int x){ return 5/(x-x); // warn } int main(){ test(); test2(532); printf("Hej\r\r"); } I am trying to use the clang's static code analyzer tool (scan-build) to detect errors. When I run the tool directly on the files, as for example using the following command: scan-build g++ -o 1 1.c I do get the intended output,