go.tools: remove dead code

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/90320043
This commit is contained in:
Alan Donovan 2014-04-25 15:08:13 -04:00
parent 8e263c554d
commit 6e03bb4eb4
2 changed files with 0 additions and 31 deletions

View File

@ -71,29 +71,9 @@ func parseFiles(fset *token.FileSet, ctxt *build.Context, displayPath func(strin
// ---------- Internal helpers ----------
// unparen returns e with any enclosing parentheses stripped.
func unparen(e ast.Expr) ast.Expr {
for {
p, ok := e.(*ast.ParenExpr)
if !ok {
break
}
e = p.X
}
return e
}
func unreachable() {
panic("unreachable")
}
// TODO(adonovan): make this a method: func (*token.File) Contains(token.Pos)
func tokenFileContainsPos(f *token.File, pos token.Pos) bool {
p := int(pos)
base := f.Base()
return base <= p && p < base+f.Size()
}
func filename(file *ast.File, fset *token.FileSet) string {
return fset.File(file.Pos()).Name()
}

View File

@ -423,17 +423,6 @@ func checkPointsToExpectation(e *expectation, pts pointer.PointsToSet, lineMappi
return ok
}
// underlying returns the underlying type of typ. Copied from go/types.
func underlyingType(typ types.Type) types.Type {
if typ, ok := typ.(*types.Named); ok {
return typ.Underlying() // underlying types are never NamedTypes
}
if typ == nil {
panic("underlying(nil)")
}
return typ
}
func checkTypesExpectation(e *expectation, pts pointer.PointsToSet, typ types.Type) bool {
var expected typeutil.Map
var surplus typeutil.Map