This addresses the problem that when having a comment at the end of a return type declaration the function name is incorrectly indented.
The bellow example, having this input:
template<typename T> // Templates on own line. static int // Return type on own line for top-level functions. MyFunction(int a)
The result would be:
template<typename T> // Templates on own line. static int // Return type on own line for top-level functions. MyFunction(int a)
The above result is wrong the correct one is:
template<typename T> // Templates on own line. static int // Return type on own line for top-level functions. MyFunction(int a)
This was happening because in function isStartOfName the possibility oh having a comment before the actual name was not considered thus the comment was not ignored, like the const keyword is.
Test case will follow.