Don't add spaces after ( in convert_comments.go.
Code like this:
if (// Check if the cipher is supported for the current version.
SSL_CIPHER_get_min_version(c) <= ssl3_protocol_version(ssl) &&
ssl3_protocol_version(ssl) <= SSL_CIPHER_get_max_version(c) &&
// Check the cipher is supported for the server configuration.
(c->algorithm_mkey & mask_k) &&
(c->algorithm_auth & mask_a) &&
// Check the cipher is in the |allow| list.
sk_SSL_CIPHER_find(allow, &cipher_index, c)) {
should not get an extra space.
Change-Id: I772cbcfabf2481dc8e3a8b257d85573b0b5ac1b7
Reviewed-on: https://boringssl-review.googlesource.com/18745
Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/util/convert_comments.go b/util/convert_comments.go
index f5171c3..9e8d654 100644
--- a/util/convert_comments.go
+++ b/util/convert_comments.go
@@ -186,7 +186,7 @@
// comment if it is on the same line as code,
// but clang-format has been placing one space
// for block comments. Fix this.
- if !allSpaces(line[:idx]) {
+ if !allSpaces(line[:idx]) && line[idx-1] != '(' {
if line[idx-1] != ' ' {
out.WriteString(" ")
} else if line[idx-2] != ' ' {