| 161 | } |
| 162 | |
| 163 | virtual void Initialize(clang::ASTContext& Ctx) override { |
| 164 | annotator.setSourceMgr(Ctx.getSourceManager(), Ctx.getLangOpts()); |
| 165 | annotator.setMangleContext(Ctx.createMangleContext()); |
| 166 | ci.getPreprocessor().addPPCallbacks(maybe_unique(new PreprocessorCallback( |
| 167 | annotator, ci.getPreprocessor(), WasInDatabase == DatabaseType::ProcessFullDirectory))); |
| 168 | ci.getDiagnostics().setClient(new BrowserDiagnosticClient(annotator), true); |
| 169 | ci.getDiagnostics().setErrorLimit(0); |
| 170 | } |
| 171 | |
| 172 | virtual bool HandleTopLevelDecl(clang::DeclGroupRef D) override { |
| 173 | if (ci.getDiagnostics().hasFatalErrorOccurred()) { |
nothing calls this directly
no test coverage detected