[PATCH] Insert override at the same line as the end of the function declaration
Alexander Kornienko
alexfh at google.com
Fri May 8 03:10:11 PDT 2015
Sorry for the long delay. I was on vacation and now digging out stuff of my inbox.
Thanks for the patch! I've got a few comments regarding the implementation though.
================
Comment at: clang-tidy/misc/UseOverrideCheck.cpp:158
@@ +157,3 @@
+ bool Found = false;
+ for (Token T : Tokens) {
+ if (T.is(tok::l_paren))
----------------
Can you just find the last non-comment token before the opening brace?
================
Comment at: clang-tidy/misc/UseOverrideCheck.cpp:159
@@ +158,3 @@
+ for (Token T : Tokens) {
+ if (T.is(tok::l_paren))
+ ++Parens;
----------------
Please use the braces for all branches, if they are used for at least one. Also, run clang-format on the new code.
http://reviews.llvm.org/D9286
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list