@Override public void visitFunctionCallExpr(FunctionCallExpr functionCallExpr) { super.visitFunctionCallExpr(functionCallExpr); final String enclosingFunctionName = enclosingFunction.getPrototype().getName(); final String calledFunctionName = functionCallExpr.getCallee(); assert callsIndirectly.containsKey(enclosingFunctionName); if (!callsIndirectly.containsKey(calledFunctionName)) { return; } for (String function : callsIndirectly.keySet()) { if (callsIndirectly.get(function).contains(enclosingFunctionName)) { callsIndirectly.get(function).addAll(callsIndirectly .get(calledFunctionName)); } } }
@Override public void visitFunctionCallExpr(FunctionCallExpr functionCallExpr) { functionCallExpr.setCallee(applyFunctionNameMapping(functionCallExpr.getCallee())); super.visitFunctionCallExpr(functionCallExpr); }
@Override public void visitFunctionCallExpr(FunctionCallExpr functionCallExpr) { super.visitFunctionCallExpr(functionCallExpr); List<FunctionPrototype> candidateBuiltins = TyperHelper.getBuiltins(shadingLanguageVersion) .get(functionCallExpr.getCallee()); if (candidateBuiltins != null) { for (FunctionPrototype prototype : candidateBuiltins) { if (prototypeMatches(prototype, functionCallExpr)) { types.put(functionCallExpr, prototype.getReturnType()); } } } Set<FunctionPrototype> candidateUserDefined = userDefinedFunctions.get(functionCallExpr.getCallee()); if (candidateUserDefined != null) { for (FunctionPrototype prototype : candidateUserDefined) { if (prototypeMatches(prototype, functionCallExpr)) { types.put(functionCallExpr, prototype.getReturnType()); } } } }
@Override public void visitFunctionCallExpr(FunctionCallExpr functionCallExpr) { super.visitFunctionCallExpr(functionCallExpr); for (int i = 0; i < functionCallExpr.getNumArgs(); i++) { Expr arg = functionCallExpr.getArg(i); if (arg instanceof VariableIdentifierExpr && ((VariableIdentifierExpr) arg) .getName().equals(declaration.getVariablesDeclaration().getDeclInfo(0).getName())) { functionCallExpr.setArg(i, new VariableIdentifierExpr(originalVariableInfo.getName())); } } }
@Override public void visitFunctionCallExpr(FunctionCallExpr functionCallExpr) { if (MacroNames.isFuzzed(functionCallExpr)) { injectionTracker.enterFuzzedMacro(); } if (MacroNames.isDeadByConstruction(functionCallExpr)) { injectionTracker.enterDeadMacro(); } super.visitFunctionCallExpr(functionCallExpr); if (MacroNames.isDeadByConstruction(functionCallExpr)) { injectionTracker.exitDeadMacro(); } if (MacroNames.isFuzzed(functionCallExpr)) { injectionTracker.exitFuzzedMacro(); } }