Skip to content

Commit

Permalink
Use DMD in VcallCtorChecker
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladiwostok committed Mar 7, 2024
1 parent a805955 commit a5d3575
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 421 deletions.
10 changes: 6 additions & 4 deletions src/dscanner/analysis/run.d
Original file line number Diff line number Diff line change
Expand Up @@ -884,10 +884,6 @@ private BaseAnalyzer[] getAnalyzersForModuleAndConfig(string fileName,
checks ~= new AutoFunctionChecker(args.setSkipTests(
analysisConfig.auto_function_check == Check.skipTests && !ut));

if (moduleName.shouldRun!VcallCtorChecker(analysisConfig))
checks ~= new VcallCtorChecker(args.setSkipTests(
analysisConfig.vcall_in_ctor == Check.skipTests && !ut));

if (moduleName.shouldRun!UselessInitializerChecker(analysisConfig))
checks ~= new UselessInitializerChecker(args.setSkipTests(
analysisConfig.useless_initializer == Check.skipTests && !ut));
Expand Down Expand Up @@ -1347,6 +1343,12 @@ MessageSet analyzeDmd(string fileName, ASTCodegen.Module m, const char[] moduleN
config.number_style_check == Check.skipTests && !ut
);

if (moduleName.shouldRunDmd!(VcallCtorChecker!ASTCodegen)(config))
visitors ~= new VcallCtorChecker!ASTCodegen(
fileName,
config.vcall_in_ctor == Check.skipTests && !ut
);

foreach (visitor; visitors)
{
m.accept(visitor);
Expand Down
Loading

0 comments on commit a5d3575

Please sign in to comment.