benhamilton added a comment. > a user sets the existing IndentWrappedFunctionNames to true for ObjC and to > false for C++. > Now IMO, that should mean that ObjC function names are indented and C++ > functions are not, even if the language of the *file* is ObjC. > Getting this right will require some refactoring of how a style is passed > around and used, but I think it'd be the right thing to do.
This is an interesting proposal, but adding infrastructure to pass around and manage per-language `FormatStyle` objects to formatter logic seems like a large change to me, and a lot of work to avoid adding a new configuration option. Without changing the architecture to pass around per-language `FormatStyle`s, we could also unconditionally indent wrapped Objective-C methods in all styles (ignoring `IndentWrappedFunctionNames`) and make `IndentWrappedFunctionNames` only apply to C++ functions and methods. I just did a survey of open-source Objective-C code in use at Google, and it's over 5:1 in favor of indenting wrapped Objective-C methods. What do you think of that option? Repository: rC Clang https://reviews.llvm.org/D45004 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits