Beispiel #1
0
AnalysisManager::AnalysisManager(ASTContext &ctx, DiagnosticsEngine &diags,
                                 const LangOptions &lang,
                                 const PathDiagnosticConsumers &PDC,
                                 StoreManagerCreator storemgr,
                                 ConstraintManagerCreator constraintmgr,
                                 CheckerManager *checkerMgr,
                                 AnalyzerOptions &Options,
                                 CodeInjector *injector)
  : AnaCtxMgr(Options.UnoptimizedCFG,
              Options.includeImplicitDtorsInCFG(),
              /*AddInitializers=*/true,
              Options.includeTemporaryDtorsInCFG(),
	            Options.includeLifetimeInCFG(),
              // Adding LoopExit elements to the CFG is a requirement for loop
              // unrolling.
              Options.includeLoopExitInCFG() || Options.shouldUnrollLoops(),
              Options.shouldSynthesizeBodies(),
              Options.shouldConditionalizeStaticInitializers(),
              /*addCXXNewAllocator=*/true,
              injector),
    Ctx(ctx),
    Diags(diags),
    LangOpts(lang),
    PathConsumers(PDC),
    CreateStoreMgr(storemgr), CreateConstraintMgr(constraintmgr),
    CheckerMgr(checkerMgr),
    options(Options) {
  AnaCtxMgr.getCFGBuildOptions().setAllAlwaysAdd();
}
Beispiel #2
0
AnalysisManager::AnalysisManager(ASTContext &ctx, DiagnosticsEngine &diags,
                                 const LangOptions &lang,
                                 const PathDiagnosticConsumers &PDC,
                                 StoreManagerCreator storemgr,
                                 ConstraintManagerCreator constraintmgr,
                                 CheckerManager *checkerMgr,
                                 AnalyzerOptions &Options)
  : AnaCtxMgr(Options.UnoptimizedCFG,
              /*AddImplicitDtors=*/true,
              /*AddInitializers=*/true,
              Options.includeTemporaryDtorsInCFG(),
              Options.shouldSynthesizeBodies()),
    Ctx(ctx),
    Diags(diags),
    LangOpts(lang),
    PathConsumers(PDC),
    CreateStoreMgr(storemgr), CreateConstraintMgr(constraintmgr),
    CheckerMgr(checkerMgr),
    options(Options) {
  AnaCtxMgr.getCFGBuildOptions().setAllAlwaysAdd();
}