- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 103 for callExpr (0.14 sec)
-
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/sigchanyzer/sigchanyzer.go
nodeFilter := []ast.Node{ (*ast.CallExpr)(nil), } inspect.Preorder(nodeFilter, func(n ast.Node) { call := n.(*ast.CallExpr) if !isSignalNotify(pass.TypesInfo, call) { return } var chanDecl *ast.CallExpr switch arg := call.Args[0].(type) { case *ast.Ident: if decl, ok := findDecl(arg).(*ast.CallExpr); ok { chanDecl = decl } case *ast.CallExpr:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 01:28:01 UTC 2023 - 3.8K bytes - Viewed (0) -
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) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/appends/appends.go
} 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) b, ok := typeutil.Callee(pass.TypesInfo, call).(*types.Builtin) if ok && b.Name() == "append" && len(call.Args) == 1 { pass.ReportRangef(call, "append with no values") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 1.3K bytes - Viewed (0) -
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) -
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) -
src/cmd/vendor/golang.org/x/tools/go/types/typeutil/callee.go
) // Callee returns the named target of a function call, if any: // a function, method, builtin, or variable. // // Functions and methods may potentially have type parameters. func Callee(info *types.Info, call *ast.CallExpr) types.Object { fun := astutil.Unparen(call.Fun) // Look through type instantiation if necessary. isInstance := false switch fun.(type) { case *ast.IndexExpr, *ast.IndexListExpr:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 2.1K bytes - Viewed (0) -
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) -
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) -
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) -
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)