<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/125942>125942</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Ungrammatical warning message "const qualifier have no effect"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
a-tarasyuk
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
a-tarasyuk
</td>
</tr>
</table>
<pre>
https://godbolt.org/z/rT9zjMhe1
```cpp
struct A {};
using CA = const A;
struct B : CA {};
```
Clang trunk prints:
```shell
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](https://github.com/llvm/llvm-project/blob/cac67d39362b23466708e464c00ce84abe16bece/clang/include/clang/Basic/DiagnosticSemaKinds.td#L489-L494):
```cpp
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".
````
https://github.com/Quuxplusone/llvm-project/issues/46
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyslE2P2zYQhn_N-DJYQx7qwzroINt1ETRFETRFjguKoiVmaVLlx6abX19Q2rV310DTQwABNqjRzDvzPhzuvRqMlA0UOyDid4E77p_iAxBBcVjxGEbrmuv5qrP9UzOGMHlgLdAR6DjYvrM6rK0bgI7fgY7uc_396--j3EDWpqfMlkdME2StDy6KgC1CtYPqAGwHWRu9MgPuWwR2QGGND9gub57DdwisnQNefXXJvBTaa24GDC6aB5ycMmEW-VaDH6XWkLXfuDPKDCkpUDVXBKrw78i1Oinp0BrsuJcoNPcew9MkU-C-TVFAW_7ALx9iOgSqceSPEo1FeTpJERCK3d0XNRjrZH93yeyhONxq_-OEwkbnJYZRefSjjbpHz59w5P6aE2iPxoZ3ldZLjs-jRBH15FRA5dF2j8pGjydnz0lLGCV6G52QKGwvkwzavvNShTF2a2HPQEetH19-7iZnv87lj522HdBRcFFWPatZSR2xvCyrbCvzMhdZJuQ2553clJ0UMoUmW4COyggd-9cnO-6VADoeFB-M9UGJP-WZ_6ZM79ehB2If82199zGvc6D61suFp16eMLl5nyZ872SIztwvfrEWv7z4vIesRUxgJ6-KLPk4R12MASr8Jvm-5HjxvJh0dFxDtdsAa0fuodrPfx4lVIfNa28I2C9AS6UP5ldn4wRs_2Eh4NMVgDkKD_LEow7L6wXot70k_v5nJ7dN3MJb0DtsfoLghJzmIUiXWPVJ1TwYIvw2SoMqvEZ51vyDeQLR-s31eLkh_0Hqpxj_mXT01shbYJX3UXqgY16u-ob1Nav5Sjabim2rmvIqW41NV_Ul65moC6rzIt92p7Iqy7qo-bYqy41YqYYyKjLKCtoUOcvWnFUlq2RfbPOqkNRDnskzV3qdqqdduJrrNhsq6pxWmndS--c9u-DP2v6CvX9euK6ZxXdx8JBnWvngrwmDClo2f5nB8fOZByW4xuc1hmfpPR-Sy7SspOsiu_F8FZ1-v8N_fO8vY3zu6LGhfwMAAP__Ya3waA">