MCPcopy
hub / github.com/uber-go/nilaway / PosToLocation

Method PosToLocation

util/analysishelper/pass.go:95–97  ·  view source on GitHub ↗

PosToLocation converts a token.Pos as a real code location, of token.Position.

(pos token.Pos)

Source from the content-addressed store, hash-verified

93
94// PosToLocation converts a token.Pos as a real code location, of token.Position.
95func (p *EnhancedPass) PosToLocation(pos token.Pos) token.Position {
96 return p.HumanReadablePosition(p.Fset.Position(pos))
97}
98
99// ExprBarsNilness returns if the expression can never be nil for the simple reason that nil does
100// not inhabit its type.

Callers 6

duplicateFullTriggerFunction · 0.80
LocationOfMethod · 0.80
addAssignmentToConsumerFunction · 0.80
newObservedMapFunction · 0.80
truncatedConsumerPosMethod · 0.80
truncatedProducerPosMethod · 0.80

Calls 2

HumanReadablePositionMethod · 0.95
PositionMethod · 0.65

Tested by

no test coverage detected