-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Closed
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer
Description
https://godbolt.org/z/rT9zjMhe1
struct A {};
using CA = const A;
struct B : CA {};Clang trunk prints:
warning: 'const' qualifier on base class type 'CA' (aka 'const A') have no effect [-Wignored-qualifiers]Of course this should say has no effect, not have no effect.
The culprit is obvious from the source code:
def warn_qual_return_type : Warning<
"'%0' type qualifier%s1 on return type %plural{1:has|:have}1 no effect">,
InGroup<IgnoredQualifiers>, DefaultIgnore;
def warn_qual_base_type : Warning<
"'%0' qualifier%s1 on base class type %2 have no effect">,
InGroup<IgnoredQualifiers>, DefaultIgnore;
The latter says "have" when it should say "%plural{1:has|:have}1".Metadata
Metadata
Assignees
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer