RFR: 8259576: Misplaced curly brace in Matcher::find_shared_post_visit

Aleksey Shipilev shade at openjdk.java.net
Mon Jan 11 18:42:07 UTC 2021


SonarCloud demo instance reports the issue here:

    case Op_VectorMaskCmp: {
      n->set_req(1, new BinaryNode(n->in(1), n->in(2)));
      n->set_req(2, n->in(3));
      n->del_req(3);
      break;
    default: // <----- ERROR
      break;
    }

"The direct parent of this switch-label is not the body of a switch statement."

This is added by JDK-8223347, and it is an obviously misplaced curly-brace. It is innocuous in current code, but may become problematic as more cases are added to the switch.

-------------

Commit messages:
 - 8259576: Misplaced curly brace in Matcher::find_shared_post_visit

Changes: https://git.openjdk.java.net/jdk/pull/2031/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2031&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8259576
  Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2031.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2031/head:pull/2031

PR: https://git.openjdk.java.net/jdk/pull/2031


More information about the hotspot-compiler-dev mailing list