How to register a new checker in clang-analyzer?

Hello!
I wrote a checker named “ReactorChecker” .After re-config, I got an error when I run “make” in the folder where I built LLVM and Clang.The error is:

error: ‘void clang::ento::registerReactorChecker(clang::ento::CheckerManager&)’ should have been declared inside ‘clang::ento’

PS:the version of my LLVM is 3.6.
Anybody help me ?Thank you very much!

zhaoqian

You could look at this example:
https://github.com/azat/clang/commit/6914e463518c2b4dd5403a957727e4b1d7bc7399

In short you should add next lines into lib/StaticAnalyzer/Checkers/Checkers.td:
def ReactorChecker : Checker<"Reactor">,
  HelpText<"Reactor">,
  DescFile<"ReactorChecker.cpp">;

And don't forget to add you module into CMakeLists.txt