<div dir="ltr">Hi,<div><br></div><div>I am trying to use clang static checker from command line. I knew there are two ways to do that. One is using scan-build command, which works fine for me. But I need to use the checker in another way, which is from the official website, like:</div><div><br></div><div>               clang -Xclang -analyze <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">-Xclang </span>-analyzer-checker=checker_name test.c</div><div><br></div><div>This reported me /usr/bin/ld: cannot find /tmp/xxx.o: File format not recognized. It seems like the xxx.o file never being generated using this command line. </div><div><br></div><div>When I added -cc1 option, using it like this way,</div><div><br></div><div>                clang -cc1 -analyze -analyzer-checker=xxx test.c<br></div><div><br></div><div>The error is gone, but I have to include all the default compiler headers manually, which I don't wanna do.</div><div><br></div><div>My question is, what's the right way to pass the checker to clang to get the bug report and the built file at the same time?</div><div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div style="font-size:small"><span style="font-size:12.8px">Thanks,</span></div><div style="font-size:small"><span style="font-size:12.8px">Ying</span></div></div></div></div>
</div></div>