Convince clang-format to handle ASN1_ITEM definitions better
Adding the ending macros to StatementMacros tells clang-format the macro
terminates a statement. Adding trailing commas in the middle keeps it
from trying to bundle the curly brace with the next statement.
Also add a few other trailing commas that clang-format otherwise indents
awkwardly.
Change-Id: I0b2ba9cf07bc775649fa1e92de3e5bb2e2b0b20b
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/52728
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
diff --git a/.clang-format b/.clang-format
index 0098935..68c331a 100644
--- a/.clang-format
+++ b/.clang-format
@@ -46,6 +46,7 @@
- "IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name"
- "IMPLEMENT_ASN1_FUNCTIONS_fname"
- "IMPLEMENT_ASN1_FUNCTIONS_name"
+ - "IMPLEMENT_ASN1_TYPE_ex"
- "IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS"
- "IMPLEMENT_PEM_read"
- "IMPLEMENT_PEM_read_bio"
@@ -65,3 +66,13 @@
- "IMPLEMENT_PEM_write_const"
- "IMPLEMENT_PEM_write_fp"
- "IMPLEMENT_PEM_write_fp_const"
+ - "ASN1_ADB_END"
+ - "ASN1_CHOICE_END"
+ - "ASN1_ITEM_TEMPLATE_END"
+ - "ASN1_SEQUENCE_END"
+ - "ASN1_SEQUENCE_END_cb"
+ - "ASN1_SEQUENCE_END_enc"
+ - "ASN1_SEQUENCE_END_ref"
+ # This isn't quite right, but it causes clang-format to do a slightly better
+ # job with this macro.
+ - "ASN1_EX_TEMPLATE_TYPE"