-
Notifications
You must be signed in to change notification settings - Fork 594
Closed
Labels
Description
Can't set sp_inside_braces_struct=add otherwise Uncrustify starts applying it to initializers combined with old-C-style struct usage.
struct in_addr addr = {0};
... --> ...
struct in_addr addr = { 0 };
Expected versus output diff:
diff --git "a/C:\\work\\external\\uncrustify\\tests\\output\\staging\\10060-UNI-1350.cpp" "b/C:\\work\\external\\uncrustify\\tests\\results\\staging\\10060-UNI-1350.cpp"
index 8fc358d..e3a60f5 100644
--- "a/C:\\work\\external\\uncrustify\\tests\\output\\staging\\10060-UNI-1350.cpp"
+++ "b/C:\\work\\external\\uncrustify\\tests\\results\\staging\\10060-UNI-1350.cpp"
@@ -1,5 +1,5 @@
// Can't set sp_inside_braces_struct=add otherwise Uncrustify starts applying it to initializers combined with old-C-style struct usage.
-struct in_addr addr = {0};
+struct in_addr addr = { 0 };
// ... --> ...
struct in_addr addr = { 0 };Debug support files:
10060-UNI-1350.cpp
10060-UNI-1350.cpp.log
10060-UNI-1350.cpp.unc
UNI-1350.cfg
UNI-1350.cpp
Disclaimer:
Note: This is a generated issue from our internal issue tracker.
Expect a dry description which could be insufficient to properly understand the issue.
On the other hand, the support files should be sufficient to easily reproduce and debug the issue,
but please comment if it's still unclear and I will get back with clarifications.
See main discussion thread here #1223.
Reactions are currently unavailable