[cfe-dev] I get no reports from running "scan-build <args...> make -k

salvatore benedetto salvatore.benedetto at gmail.com
Thu Jun 27 00:29:19 PDT 2013


Hi,

I am having the same problem.

I moved everything under the directory where the binaries are installed
as it works for Mikhail but I still don't get the report.

Running scan-build on this test code

int main(int argc, char** argv)
{
    uint8_t array[12];
    uint8_t* ptr;
    uint8_t i = 10/0;

    array[3] = *ptr;

    for (uint8_t i = 0; i < 13; i++) {
        printf("%d\n", array[i]);
        array[i] = 1;
    }

    printf("%d\n", ptr[1]);
    ptr = array;

    return 0;
}

$ scan-build --use-analyzer=`which c++-analyzer` -V -o . make
scan-build: Using
'/home/xxxx/programming/llvm-bld/Release+Debug+Asserts/bin/c++-analyzer'
for static analysis
clang++ test.cpp -o test
test.cpp:18:19: warning: division by zero is undefined [-Wdivision-by-zero]
    uint8_t i = 10/0;
                  ^~
1 warning generated.
scan-build: Removing directory
'/home/xxxx/programming/clang-check-test/2013-06-27-1' because it contains
no reports.
scan-build: No bugs found.

Running it with strace show the following

stat64("/home/xxxx/programming/clang-check-test/2013-06-27-1/failures",
0x94ea0c4) = -1 ENOENT (No such file or directory)
write(1, "scan-build: Removing directory '"..., 118scan-build: Removing
directory '/home/xxxx/programming/clang-check-test/2013-06-27-1' because it
contains no reports.
) = 118

For some reason failures is not created.

Any hints?

S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130627/3d644518/attachment.html>


More information about the cfe-dev mailing list