GNOME Bugzilla – Bug 722720
indentation-c-style: Change get_line_indentation() behaviour.
Last modified: 2014-01-25 12:11:18 UTC
See attached patch.
Created attachment 266912 [details] [review] indentation-c-style: Change get_line_indentation() behaviour. Change it to not only search on the current line for the first right brace but search until one is found or a right bracket is found. This fixes indentation issues with c++11 type return value syntax such as: auto testFunction() -> int { return 5; } Where the return type is put on another line different from the end right brace.
Review of attachment 266912 [details] [review]: Thank you for your patch, you can commit it. Your code is simpler than the previous one, but it's difficult to be sure that there is no regression without some tests.
(In reply to comment #2) > Review of attachment 266912 [details] [review]: > > Thank you for your patch, you can commit it. Your code is simpler than the > previous one, but it's difficult to be sure that there is no regression without > some tests. Yeah, hopefully it doesn't cause any regressions. The indentation code would really benefit from some tests.