Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 106 for callExpr (0.23 sec)

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

    		return nil, nil // doesn't directly import errors
    	}
    
    	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 !analysisutil.IsFunctionNamed(fn, "errors", "As") {
    			return
    		}
    		if len(call.Args) < 2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 21:52:54 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/cgocall/cgocall.go

    func cgoBaseType(info *types.Info, arg ast.Expr) types.Type {
    	switch arg := arg.(type) {
    	case *ast.CallExpr:
    		if len(arg.Args) == 1 && isUnsafePointer(info, arg.Fun) {
    			return cgoBaseType(info, arg.Args[0])
    		}
    	case *ast.StarExpr:
    		call, ok := arg.X.(*ast.CallExpr)
    		if !ok || len(call.Args) != 1 {
    			break
    		}
    		// Here arg is *f(v).
    		t := info.Types[call.Fun].Type
    		if t == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  7. src/cmd/fix/cftype.go

    	// (*bad.type)(x) where x is type *unsafe.Pointer -> (*bad.type)(unsafe.Pointer(x))
    	walk(f, func(n any) {
    		if n == nil {
    			return
    		}
    		// Find pattern like (*a.b)(x)
    		c, ok := n.(*ast.CallExpr)
    		if !ok {
    			return
    		}
    		if len(c.Args) != 1 {
    			return
    		}
    		p, ok := c.Fun.(*ast.ParenExpr)
    		if !ok {
    			return
    		}
    		s, ok := p.X.(*ast.StarExpr)
    		if !ok {
    			return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 00:25:49 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  8. src/go/types/errorcalls_test.go

    	fset := token.NewFileSet()
    	files, err := pkgFiles(fset, ".")
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	for _, file := range files {
    		ast.Inspect(file, func(n ast.Node) bool {
    			call, _ := n.(*ast.CallExpr)
    			if call == nil {
    				return true
    			}
    			selx, _ := call.Fun.(*ast.SelectorExpr)
    			if selx == nil {
    				return true
    			}
    			if !(isName(selx.X, "check") && isName(selx.Sel, "errorf")) {
    				return true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 15 21:57:36 UTC 2023
    - 2.2K 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