MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / preVisitArgument

Method preVisitArgument

src/ast/ast_lint.cpp:1111–1124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1109 return Visitor::visit(fn);
1110 }
1111 virtual void preVisitArgument ( Function * fn, const VariablePtr & var, bool lastArg ) override {
1112 Visitor::preVisitArgument(fn, var, lastArg);
1113 if ( checkUnusedArgument ) {
1114 if ( !var->marked_used && var->isAccessUnused() ) {
1115 program->error("unused function argument " + var->name, "",
1116 "use [unused_argument(" + var->name + ")] if intentional",
1117 var->at, CompilationError::invalid_function_argument);
1118 }
1119 }
1120 if ( var->type->getSizeOf64()>0x7fffffff ) {
1121 program->error("argument variable " + var->name + " is too big", "", "",
1122 var->at,CompilationError::exceeds_argument);
1123 }
1124 }
1125 virtual void preVisit ( ExprBlock * block ) override {
1126 Visitor::preVisit(block);
1127 if ( block->isClosure ) {

Callers

nothing calls this directly

Calls 3

isAccessUnusedMethod · 0.80
errorMethod · 0.45
getSizeOf64Method · 0.45

Tested by

no test coverage detected