- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 43 for callExpr (0.26 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/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/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) -
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) -
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)