- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 92 for CallExpr (0.13 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/defers/defers.go
} func run(pass *analysis.Pass) (interface{}, error) { if !analysisutil.Imports(pass.Pkg, "time") { return nil, nil } checkDeferCall := func(node ast.Node) bool { switch v := node.(type) { case *ast.CallExpr: if analysisutil.IsFunctionNamed(typeutil.StaticCallee(pass.TypesInfo, v), "time", "Since") { pass.Reportf(v.Pos(), "call to time.Since is not deferred") } case *ast.FuncLit: return false // prune }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 1.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/lostcancel/lostcancel.go
cancelvars := make(map[*types.Var]ast.Node) // TODO(adonovan): opt: refactor to make a single pass // over the AST using inspect.WithStack and node types // {FuncDecl,FuncLit,CallExpr,SelectorExpr}. // Find the set of cancel vars to analyze. stack := make([]ast.Node, 0, 32) ast.Inspect(node, func(n ast.Node) bool { switch n.(type) { case *ast.FuncLit: if len(stack) > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 19:00:13 UTC 2024 - 9K bytes - Viewed (0)