syntax = "proto2";

message Foo {



  // The newline is not preserved between the message
  // and the first element if there aren't any trailing
  // comments on the '{'.
  option deprecated = false;

  // This is attached to the optional label.
  optional string name = 1 [
    deprecated = true
  ];

  repeated int64 values = 2;

// Leading comment on '}'.
}

enum One {

  // This value should be formatted to the top
  // because the newline is meaningless.
  ONE_UNSPECIFIED = 0;
}

// FOUR_UNSPECIFIED should be compact because it has
// no trailing or leading comments.
enum Four {

  FOUR_UNSPECIFIED = 0;
}

enum Two {
  // The trailing comments should remain separated.

  TWO_UNSPECIFIED = 0;
}
