Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for callExpr (0.21 sec)

  1. src/cmd/compile/internal/types2/util.go

    // hasDots reports whether the last argument in the call is followed by ...
    func hasDots(call *syntax.CallExpr) bool { return call.HasDots }
    
    // dddErrPos returns the node (poser) for reporting an invalid ... use in a call.
    func dddErrPos(call *syntax.CallExpr) *syntax.CallExpr {
    	// TODO(gri) should use "..." instead of call position
    	return call
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. src/go/types/generate_test.go

    func fixAtPosCall(f *ast.File) {
    	ast.Inspect(f, func(n ast.Node) bool {
    		switch n := n.(type) {
    		case *ast.CallExpr:
    			if selx, _ := n.Fun.(*ast.SelectorExpr); selx != nil && selx.Sel.Name == "dump" {
    				for i, arg := range n.Args {
    					if call, _ := arg.(*ast.CallExpr); call != nil {
    						// rewrite xxx.dump(..., atPos(x), ...) to xxx.dump(..., x.Pos(), ...)
    						if isIdent(call.Fun, "atPos") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  3. src/go/types/util.go

    func hasDots(call *ast.CallExpr) bool { return call.Ellipsis.IsValid() }
    
    // dddErrPos returns the positioner for reporting an invalid ... use in a call.
    func dddErrPos(call *ast.CallExpr) positioner { return atPos(call.Ellipsis) }
    
    // argErrPos returns positioner for reporting an invalid argument count.
    func argErrPos(call *ast.CallExpr) positioner { return inNode(call, call.Rparen) }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unsafeptr/unsafeptr.go

    	inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
    
    	nodeFilter := []ast.Node{
    		(*ast.CallExpr)(nil),
    		(*ast.StarExpr)(nil),
    		(*ast.UnaryExpr)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    		switch x := n.(type) {
    		case *ast.CallExpr:
    			if len(x.Args) == 1 &&
    				hasBasicType(pass.TypesInfo, x.Fun, types.UnsafePointer) &&
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/testinggoroutine.go

    		(*ast.FuncDecl)(nil),
    		(*ast.GoStmt)(nil),
    		(*ast.CallExpr)(nil),
    	}, func(node ast.Node, push bool) bool {
    		if !push {
    			return false
    		}
    		switch node := node.(type) {
    		case *ast.FuncDecl:
    			return hasBenchmarkOrTestParams(node)
    
    		case *ast.GoStmt:
    			c := goAsyncCall(pass.TypesInfo, node, toDecl)
    			addCall(c)
    
    		case *ast.CallExpr:
    			c := tRunAsyncCall(pass.TypesInfo, node)
    			addCall(c)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/walk.go

    		base.Fatalf("vmkcall %v needs %v args got %v", fn, n, len(va))
    	}
    
    	call := typecheck.Call(base.Pos, fn, va, false).(*ir.CallExpr)
    	call.SetType(t)
    	return walkExpr(call, init).(*ir.CallExpr)
    }
    
    func mkcall(name string, t *types.Type, init *ir.Nodes, args ...ir.Node) *ir.CallExpr {
    	return vmkcall(typecheck.LookupRuntime(name), t, init, args)
    }
    
    func mkcallstmt(name string, args ...ir.Node) ir.Node {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    	x = astutil.Unparen(x) // ignore parens on rhs
    
    	if _, ok := x.(*ast.CompositeLit); ok {
    		return nil
    	}
    	if _, ok := x.(*ast.CallExpr); ok {
    		// A call may return a zero value.
    		return nil
    	}
    	if star, ok := x.(*ast.StarExpr); ok {
    		if _, ok := astutil.Unparen(star.X).(*ast.CallExpr); ok {
    			// A call may return a pointer to a zero value.
    			return nil
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top