Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 69 for callExpr (0.2 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/tests/tests.go

    }
    
    // isFuzzTargetDotFuzz reports whether call is (*testing.F).Fuzz().
    func isFuzzTargetDotFuzz(pass *analysis.Pass, call *ast.CallExpr) bool {
    	return isFuzzTargetDot(pass, call, "Fuzz")
    }
    
    // isFuzzTargetDotAdd reports whether call is (*testing.F).Add().
    func isFuzzTargetDotAdd(pass *analysis.Pass, call *ast.CallExpr) bool {
    	return isFuzzTargetDot(pass, call, "Add")
    }
    
    // isFuzzTargetDot reports whether call is (*testing.F).<name>().
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/assign.go

    		left, right = n.X, n.Y
    	}
    
    	// Recognize m[k] = append(m[k], ...) so we can reuse
    	// the mapassign call.
    	var mapAppend *ir.CallExpr
    	if left.Op() == ir.OINDEXMAP && right.Op() == ir.OAPPEND {
    		left := left.(*ir.IndexExpr)
    		mapAppend = right.(*ir.CallExpr)
    		if !ir.SameSafeExpr(left, mapAppend.Args[0]) {
    			base.Fatalf("not same expressions: %v != %v", left, mapAppend.Args[0])
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/slog/slog.go

    	var attrType types.Type // The type of slog.Attr
    	inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
    	nodeFilter := []ast.Node{
    		(*ast.CallExpr)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(node ast.Node) {
    		call := node.(*ast.CallExpr)
    		fn := typeutil.StaticCallee(pass.TypesInfo, call)
    		if fn == nil {
    			return // not a static call
    		}
    		if call.Ellipsis != token.NoPos {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/func.go

    	}
    	return n
    }
    
    // FixVariadicCall rewrites calls to variadic functions to use an
    // explicit ... argument if one is not already present.
    func FixVariadicCall(call *ir.CallExpr) {
    	fntype := call.Fun.Type()
    	if !fntype.IsVariadic() || call.IsDDD {
    		return
    	}
    
    	vi := fntype.NumParams() - 1
    	vt := fntype.Param(vi).Type
    
    	args := call.Args
    	extra := args[vi:]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/inline/interleaved/interleaved.go

    		}
    
    		match := func(n ir.Node) bool {
    			switch n := n.(type) {
    			case *ir.CallExpr:
    				return true
    			case *ir.TailCallStmt:
    				n.Call.NoInline = true // can't inline yet
    			}
    			return false
    		}
    
    		edit := func(n ir.Node) ir.Node {
    			call, ok := n.(*ir.CallExpr)
    			if !ok { // previously inlined
    				return nil
    			}
    
    			devirtualize.StaticCall(call)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 20:42:52 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stringintconv/string.go

    	return ""
    }
    
    func run(pass *analysis.Pass) (interface{}, error) {
    	inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
    	nodeFilter := []ast.Node{
    		(*ast.CallExpr)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    		call := n.(*ast.CallExpr)
    
    		if len(call.Args) != 1 {
    			return
    		}
    		arg := call.Args[0]
    
    		// Retrieve target type name.
    		var tname *types.TypeName
    		switch fun := call.Fun.(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.2K bytes
    - Viewed (0)
Back to top