]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: remove redundant "// fallthrough" comments
authorMatthew Dempsky <mdempsky@google.com>
Fri, 22 Apr 2016 22:45:24 +0000 (15:45 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 22 Apr 2016 23:14:35 +0000 (23:14 +0000)
Change-Id: Ia3f262f06592b66447c213e2350402cd5e6e2ccd
Reviewed-on: https://go-review.googlesource.com/22389
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/gc/const.go
src/cmd/compile/internal/gc/init.go
src/cmd/compile/internal/gc/sinit.go
src/cmd/compile/internal/gc/typecheck.go

index 68bcae3f4c00372670018768d87fe658d0610678..99b48f5ffe56fab7b363ba9fec5ace402bf1a8f8 100644 (file)
@@ -226,16 +226,13 @@ func convlit1(n *Node, t *Type, explicit bool, reuse canReuseNode) *Node {
        case OCOMPLEX:
                if n.Type.Etype == TIDEAL {
                        switch t.Etype {
-                       // If trying to convert to non-complex type,
-                       // leave as complex128 and let typechecker complain.
                        default:
+                               // If trying to convert to non-complex type,
+                               // leave as complex128 and let typechecker complain.
                                t = Types[TCOMPLEX128]
                                fallthrough
-
-                               //fallthrough
                        case TCOMPLEX128:
                                n.Type = t
-
                                n.Left = convlit(n.Left, Types[TFLOAT64])
                                n.Right = convlit(n.Right, Types[TFLOAT64])
 
@@ -711,8 +708,6 @@ func evconst(n *Node) {
                                break
                        }
                        fallthrough
-
-                       // fall through
                case OCONV_ | CTINT_,
                        OCONV_ | CTRUNE_,
                        OCONV_ | CTFLT_,
index d355a46557328b7ff6e3cc4b531daec434d4f09b..6c9223b57a1b250c0728113df97c9abb1961991e 100644 (file)
@@ -58,8 +58,6 @@ func anyinit(n []*Node) bool {
                                break
                        }
                        fallthrough
-
-                       // fall through
                default:
                        return true
                }
index 5560415cab125c3012a56506a4befe57c5135c3f..2c2ade06f5dcc547e34956688dc3d7beaee61f4a 100644 (file)
@@ -342,8 +342,6 @@ func staticcopy(l *Node, r *Node, out *[]*Node) bool {
                        return true
                }
                fallthrough
-
-               // fall through
        case OSTRUCTLIT:
                p := initplans[r]
 
@@ -1332,8 +1330,6 @@ func iszero(n *Node) bool {
                        break
                }
                fallthrough
-
-               // fall through
        case OSTRUCTLIT:
                for _, n1 := range n.List.Slice() {
                        if !iszero(n1.Right) {
index 7a8c65dc58eb468f3666589983df65ac2d9cef75..9bf4f58412b839764d8e586a26b0ee89adac3906 100644 (file)
@@ -3153,8 +3153,6 @@ func islvalue(n *Node) bool {
                        return false
                }
                fallthrough
-
-               // fall through
        case OIND, ODOTPTR, OCLOSUREVAR, OPARAM:
                return true
 
@@ -3858,11 +3856,8 @@ func markbreak(n *Node, implicit *Node) {
                ORANGE:
                implicit = n
                fallthrough
-
-               // fall through
        default:
                markbreak(n.Left, implicit)
-
                markbreak(n.Right, implicit)
                markbreaklist(n.Ninit, implicit)
                markbreaklist(n.Nbody, implicit)