<div>š</div><div>Hi Salvatore,</div><div>š</div><div>please do following:</div><div>š</div><div>$which clang++</div><div>/usr/bin/clang++ (should be here. I hope that the limitation isn't mandatory, but it will be much easier)</div><div>š</div><div>$<span style="font-size:medium;"><em><span style="line-height:115%;" lang="EN-US">which scan-build</span></em></span><p><span style="font-size:medium;line-height:115%;" lang="EN-US">/usr/bin/scan-build</span></p><p><span style="font-size:medium;"><em><span style="line-height:115%;" lang="EN-US">$ls /usr/bin/scanview.css</span></em></span></p><p><span style="font-size:medium;line-height:115%;" lang="EN-US">/usr/bin/scanview.css</span></p><p><span style="font-size:medium;"><em><span style="line-height:115%;" lang="EN-US">$ls /usr/bin/sorttable.js</span></em></span></p><p><span style="font-size:medium;line-height:115%;" lang="EN-US">/usr/bin/sorttable.js</span></p><span style="font-size:medium;"> </span></div><div>All these files should be in place. If Yes, then your installation was successful.</div><div>And next:</div><div>š</div><div>export CXX=clang++</div><div>š</div><div>then, verify your Makefile</div><div>--</div><div>all:</div><div>ššš $(CXX) main.cpp hello.cpp factorial.cpp -o hello</div><div>clean:</div><div>ššš rm -rf hello</div><div>--</div><div>execute your command:</div><div>š</div><div><div>$ scan-build -o ./ make</div></div><div>š</div><div>In my case it helped. (Thanks to Ted and Anna).</div><div>BR,</div><div>Mikhail.</div><div>š</div><div>27.06.2013, 11:59, "salvatore benedetto" <salvatore.benedetto@gmail.com>:</div><blockquote type="cite"><div dir="ltr">Hi,<div>š</div><div>I am having the same problem.</div><div>š</div><div>I moved everything under the directory where the binaries are installed</div><div>as it works for Mikhail but I still don't get the report.</div><div>š</div><div>Running scan-build on this test code</div><div>š</div><div><div>int main(int argc, char** argv)</div><div>{</div><div>š š uint8_t array[12];</div><div>š š uint8_t* ptr;</div><div>š š uint8_t i = 10/0;</div><div>š</div><div>š š array[3] = *ptr;</div><div>š</div><div>š š for (uint8_t i = 0; i < 13; i++) {</div><div>š š š š printf("%d\n", array[i]);</div><div>š š š š array[i] = 1;</div><div>š š }</div><div>š</div><div>š š printf("%d\n", ptr[1]);</div><div>š š ptr = array;</div><div>š</div><div>š š return 0;</div><div>}</div><div>š</div></div><div><div>$ scan-build --use-analyzer=`which c++-analyzer` -V -o . make</div><div>scan-build: Using '/home/xxxx/programming/llvm-bld/Release+Debug+Asserts/bin/c++-analyzer' for static analysis</div><div>clang++ test.cpp -o test</div><div>test.cpp:18:19: warning: division by zero is undefined [-Wdivision-by-zero]</div><div>š š uint8_t i = 10/0;</div><div>š š š š š š š š š ^~</div><div>1 warning generated.</div><div>scan-build: Removing directory '/home/xxxx/programming/clang-check-test/<span>2013-06-27-1</span>' because it contains no reports.</div><div>scan-build: No bugs found.</div><div>š</div><div>Running it with strace show the following</div><div>š</div><div><div>stat64("/home/xxxx/programming/clang-check-test/<span>2013-06-27-1</span>/failures", 0x94ea0c4) = -1 ENOENT (No such file or directory)</div><div>write(1, "scan-build: Removing directory '"..., 118scan-build: Removing directory '/home/xxxx/programming/clang-check-test/<span>2013-06-27-1</span>' because it contains no reports.</div><div>) = 118</div></div><div>š</div><div>For some reason failures is not created.</div><div>š</div><div>Any hints?</div><div>š</div></div><div>S.</div></div></blockquote>