[cfe-dev] analyzer: invoking a single analyzer from the static analysis tools.

Michael Katelman katelman at gmail.com
Fri Feb 21 14:22:18 PST 2014


I was wondering if someone might be able to help me with cleanly invoking a
single analyzer from the static analysis tools.

I am not sure what I need to do (or, should be doing instead) in a
situation like the one below where I've got a header like stdio.h included
(--analyze figures it out, but then it appears that I lose the ability to
apply a single checker) :

% ./Debug+Asserts/bin/clang -cc1 -analyze
-analyzer-checker=core.DivideZero ./tmp/main.c

./tmp/main.c:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.

% cat ./tmp/main.c

#include <stdio.h>

int main( int argc, char** argv){
  int x = 1;
  int y = 0;

  printf("%d\n", x / y);

  return  0;
}

Thanks!

-Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140221/4758437a/attachment.html>


More information about the cfe-dev mailing list