[cfe-dev] Let checker depend on PPCallbacks

Stefan Schulze Frielinghaus via cfe-dev cfe-dev at lists.llvm.org
Fri Jan 8 09:53:15 PST 2021


Hi all,

Is it possible to let a checker depend on a PPCallbacks implementation?  For
example, currently I've implemented a checker in a shared library which I load
and register via

extern "C"
void clang_registerCheckers(CheckerRegistry &registry) {
  registry.addChecker<Foobar>("foobar", "", "");
}

extern "C"
const char clang_analyzerAPIVersionString[] =
  CLANG_ANALYZER_API_VERSION_STRING;

Prior running the checker I would like to register and run a PPCallbacks
implementation and pass the collected information to the checker.  Is there a
supposed way to accomplish that?

Cheers,
Stefan


More information about the cfe-dev mailing list