Patches to add-override functionality to cpp11-migrate tool

Dmitri Gribenko gribozavr at
Wed Feb 13 04:41:56 PST 2013

On Fri, Feb 8, 2013 at 11:01 PM, Philip Dunstan <phil at> wrote:
> Hello
> These patches continue some work that I started back in July (before RL
> kicked in) to create a C++11 migration tool that would add the override
> specifier to suitable member functions where it could. I have reworked the
> tool to integrate it into the cpp11-migrate tool in the tool/extra
> repository.

+static bool isWhitespace(char C) {
+  return (C == ' ') || (C == '\t') || (C == '\f') ||
+         (C == '\v') || (C == '\n') || (C == '\r');

You can use isWhitespace() from clang/Basic/CharInfo.h for this.

+  AddOverrideFixer(clang::tooling::Replacements &Replace,
+                   unsigned &AcceptedChanges) :
+  Replace(Replace),
+  AcceptedChanges(AcceptedChanges) { }

Please indent member initializers.

This LGTM, but there's documentation missing -- obviously because
there's no place to put it currently.  After the patch to add a
documentation page for cpp11-migrate lands, could you write up some
user-visible documentation?


(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at>*/

More information about the cfe-commits mailing list