johannes/clang-php-checker

example of usage doesn't work

Closed this issue · 6 comments

unknown argument: load

clang -Xclang -fcolor-diagnostics
-Xclang -analyze
-Xclang -analyzer-checker=php.ZPPChecker7
-Xclang -load=php-zpp-version=PHP7
-Xclang -analyzer-config -Xclang php-zpp-version=PHP7
../php-src/ext/interbase/interbase.c

Which version of llvm/clang are you using?

clang-3.4

This is weird ... on one of my boxes (Oracle Linux 6.5, same as RHEL 6.5) I have 3.4, too. There the option exists:

$ clang -v
clang version 3.4 (tags/RELEASE_34/final)
[...]
$ clang -cc1 -help | grep -- -load
  -load <dsopath>         Load the named plugin (dynamic shared object)

# For this approach we need a (empty) file (foo.c) to tell clang to go to compile mode, -Xclang
# simply passes commands through to -cc1 as above, so same output expected:
$ clang -Xclang -help  -c foo.c | grep -- -load
  -load <dsopath>         Load the named plugin (dynamic shared object)

seems that i have xorg edgers

I will purge then recheck , that i hope will fix it

https://launchpad.net/~xorg-edgers/+archive/ubuntu/ppa

confirmed , now it works

clang -cc1 -help | grep -- -load

it wasn't related to clang version but the way path was given
-load /path/to/PHPChecker.so instead of -load=/path/to/PHPChecker.so