vendredi 12 janvier 2018

Wsuggest-override raise warning even if override is present

I'm currently trying to add all missing override to a project, so I use Wsuggest-override.

From the documentation :

-Wsuggest-override

Warn about overriding virtual functions that are not marked with the override >keyword.

However, it raises a warning for all function that should use the override keyword even if the keyword is actually there

From the log:

In file included from LdBitFieldProperty.cpp:16:0:
LdBitFieldProperty.h:47:29: warning: ‘virtual std::__cxx11::string LdBitFieldProperty::GetStringValue(size_t) const’ can be marked override [-Wsuggest-override]
         virtual std::string GetStringValue( size_t aIndex = 0 ) const override;

Am I missing something about this warning usage?

my gcc is : gcc version 6.4.1 20170727 (Red Hat 6.4.1-1) (GCC)

Aucun commentaire:

Enregistrer un commentaire