[PATCH] New warning for methods not marked 'override'

David Blaikie dblaikie at gmail.com
Fri Aug 2 14:59:37 PDT 2013


On Fri, Aug 2, 2013 at 2:51 PM, Guillaume Papin
<guillaume.papin at epitech.eu> wrote:
>
>   I haven't look to much into the details but are you aware of the cpp11-migrate tool that provides a similar functionality?
>   I'm not saying that the diagnostic is not useful but maybe you can take a look at the implementation.
>   For example at a quick glance it seems to me that if a method has an inline body the fix-hint will be misplaced.
>   The check for macros such as LLVM_OVERRIDE may eventually be desired too.

Agreed - we have infrastructure for finding a canonical macro (in this
case we could do better - since we searched for a pre-existing
'override' in this class, we could just use the spelling the user used
there) from the switch fallthrough diagnostic.

>
>   http://llvm-reviews.chandlerc.com/diffusion/L/browse/clang-tools-extra/trunk/cpp11-migrate/AddOverride/AddOverrideActions.cpp;187678$56
>
> http://llvm-reviews.chandlerc.com/D1275



More information about the cfe-commits mailing list