Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 106 for callExpr (0.4 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go

    	// skip the traversal.
    	if !analysisutil.Imports(pass.Pkg, "net/http") {
    		return nil, nil
    	}
    
    	nodeFilter := []ast.Node{
    		(*ast.CallExpr)(nil),
    	}
    	inspect.WithStack(nodeFilter, func(n ast.Node, push bool, stack []ast.Node) bool {
    		if !push {
    			return true
    		}
    		call := n.(*ast.CallExpr)
    		if !isHTTPFuncOrMethodOnClient(pass.TypesInfo, call) {
    			return true // the function call is not related to this check.
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 5K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/unmarshal.go

    	// TODO(taking): Consider using a prepass to collect typeutil.Callees.
    
    	inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
    
    	nodeFilter := []ast.Node{
    		(*ast.CallExpr)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    		call := n.(*ast.CallExpr)
    		fn := typeutil.StaticCallee(pass.TypesInfo, call)
    		if fn == nil {
    			return // not a static call
    		}
    
    		// Classify the callee (without allocating memory).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/typecheck.go

    		return tcClose(n)
    
    	case ir.ODELETE:
    		n := n.(*ir.CallExpr)
    		return tcDelete(n)
    
    	case ir.OAPPEND:
    		n := n.(*ir.CallExpr)
    		return tcAppend(n)
    
    	case ir.OCOPY:
    		n := n.(*ir.BinaryExpr)
    		return tcCopy(n)
    
    	case ir.OCONV:
    		n := n.(*ir.ConvExpr)
    		return tcConv(n)
    
    	case ir.OMAKE:
    		n := n.(*ir.CallExpr)
    		return tcMake(n)
    
    	case ir.ONEW:
    		n := n.(*ir.UnaryExpr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat/timeformat.go

    	// TODO(taking): Consider using a prepass to collect typeutil.Callees.
    
    	inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
    
    	nodeFilter := []ast.Node{
    		(*ast.CallExpr)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    		call := n.(*ast.CallExpr)
    		fn, ok := typeutil.Callee(pass.TypesInfo, call).(*types.Func)
    		if !ok {
    			return
    		}
    		if !isTimeDotFormat(fn) && !isTimeDotParse(fn) {
    			return
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/stmt.go

    // into:
    //
    //	x1, y1 := x, y          // added to init
    //	func() { f(x1, y1) }()  // result
    func normalizeGoDeferCall(pos src.XPos, op ir.Op, call ir.Node, init *ir.Nodes) *ir.CallExpr {
    	init.Append(ir.TakeInit(call)...)
    
    	if call, ok := call.(*ir.CallExpr); ok && call.Op() == ir.OCALLFUNC {
    		if sig := call.Fun.Type(); sig.NumParams()+sig.NumResults() == 0 {
    			return call // already in normal form
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/atomic/atomic.go

    		n := node.(*ast.AssignStmt)
    		if len(n.Lhs) != len(n.Rhs) {
    			return
    		}
    		if len(n.Lhs) == 1 && n.Tok == token.DEFINE {
    			return
    		}
    
    		for i, right := range n.Rhs {
    			call, ok := right.(*ast.CallExpr)
    			if !ok {
    				continue
    			}
    			fn := typeutil.StaticCallee(pass.TypesInfo, call)
    			if analysisutil.IsFunctionNamed(fn, "sync/atomic", "AddInt32", "AddInt64", "AddUint32", "AddUint64", "AddUintptr") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/loopclosure/loopclosure.go

    			case *ast.GoStmt:
    				stmts = litStmts(s.Call.Fun)
    			case *ast.DeferStmt:
    				stmts = litStmts(s.Call.Fun)
    			case *ast.ExprStmt: // check for errgroup.Group.Go
    				if call, ok := s.X.(*ast.CallExpr); ok {
    					stmts = litStmts(goInvoke(pass.TypesInfo, call))
    				}
    			}
    			for _, stmt := range stmts {
    				reportCaptured(pass, vars, stmt)
    			}
    		})
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go

    func checkCall(pass *analysis.Pass) {
    	inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
    	nodeFilter := []ast.Node{
    		(*ast.CallExpr)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    		call := n.(*ast.CallExpr)
    		fn, kind := printfNameAndKind(pass, call)
    		switch kind {
    		case KindPrintf, KindErrorf:
    			checkPrintf(pass, kind, call, fn)
    		case KindPrint:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/syntax/nodes_test.go

    	{"Operation", `a @|| b`},
    	{"Operation", `a @&& b`},
    	{"Operation", `a @== b`},
    	{"Operation", `a @+ b`},
    	{"Operation", `a @* b`},
    
    	{"CallExpr", `f@()`},
    	{"CallExpr", `f@(x, y, z)`},
    	{"CallExpr", `obj.f@(1, 2, 3)`},
    	{"CallExpr", `func(x int) int { return x + 1 }@(y)`},
    
    	// ListExpr: tested via multi-value const/var declarations
    }
    
    var types = []test{
    	{"Operation", `@*T`},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 18:45:06 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssagen/ssa.go

    	case ir.OCALLFUNC:
    		n := n.(*ir.CallExpr)
    		if ir.IsIntrinsicCall(n) {
    			return s.intrinsicCall(n)
    		}
    		fallthrough
    
    	case ir.OCALLINTER:
    		n := n.(*ir.CallExpr)
    		return s.callResult(n, callNormal)
    
    	case ir.OGETG:
    		n := n.(*ir.CallExpr)
    		return s.newValue1(ssa.OpGetG, n.Type(), s.mem())
    
    	case ir.OGETCALLERPC:
    		n := n.(*ir.CallExpr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
Back to top