Skip to content

Commit

Permalink
Remove debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladiwostok committed Mar 7, 2024
1 parent 566f4ee commit bb74e35
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/dscanner/analysis/unused_result.d
Original file line number Diff line number Diff line change
Expand Up @@ -77,34 +77,18 @@ extern (C++) class UnusedResultChecker(AST) : BaseAnalyzerDmd
{
import dmd.astenums : TY;

import std.stdio : writeln;
writeln("****************************************");
writeln(statement.stmt);

writeln("Is ExpStatement: ", statement.isExpStatement() !is null);

auto exprStatement = statement.isExpStatement();
if (exprStatement is null)
return false;

writeln("Is CallExpr: ", exprStatement.exp.isCallExp() !is null);

auto callExpr = exprStatement.exp.isCallExp();

//writeln("What is callExpr?:" , callExpr.e1.op);
//auto ident = callExpr.e1.isIdentifierExp();
//writeln(ident.names[0]);
if (callExpr is null || callExpr.f is null)
return false;

writeln("Is TypeFunction: ", callExpr.f.type.isTypeFunction() !is null);

auto typeFunction = callExpr.f.type.isTypeFunction();
if (typeFunction is null || typeFunction.next.ty == TY.Tvoid)
return false;

writeln("****************************************");

return true;
}

Expand Down

0 comments on commit bb74e35

Please sign in to comment.