I am attempting to use Uncrustify on a project of mine, but I am running into some issues with spacing changes that it makes when a macro is used as the receiver of an Objective-C message. For example, given the following macro and method call, I would expect the spacing to remain exactly as is.
#define NilOrNotNSNull(val) ({id __val = (val); (__val == [NSNull null]) ? nil : __val;})
title_ = [NilOrNotNSNull([dict objectForKey:@"post_title"]) copy];
However, this is the result.
#define NilOrNotNSNull(val) ({id __val = (val); (__val == [NSNull null]) ? nil : __val;})
title_ = [NilOrNotNSNull ([dict objectForKey:@"post_title"])copy];
It appears as if Uncrustify does not recognize that the text in parentheses is an argument for the macro, but then I m not really sure what the heck it thinks it is. This seems like an Uncrustify bug to me, but it could be an issue with my config, so I figured I d ask here as well as filing an issue on GitHub. Here is the config I m using: https://gist.github.com/812314
If anyone could offer some insight, I d appreciate it.