[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 18 11:10:09 PDT 2018
aaron.ballman added a comment.
In https://reviews.llvm.org/D52670#1268569, @lebedev.ri wrote:
> In https://reviews.llvm.org/D52670#1268564, @aaron.ballman wrote:
>
> > I talked to someone at CERT responsible for maintaining DCL16-C to get their opinion on tightening the wording of the rule and their stated intent is:
>
>
> Thank you!
>
> > "If the first character is 'ell', it should be capitalized. The other ells need not be, and the yew's need not be capitalized either."
> >
> > e.g.,
> > 11lu -> diagnose
> > 11ul -> fine
> > 11llu -> diagnose
> > 11lLu -> diagnose
> > 11Llu -> fine
> > 11ul -> fine
> >
> > That said, the author (and I) agree that it'd be perfectly okay to diagnose things like `11Llu` and recommend `11LLU` as a replacement.
>
> Ok, nothing unexpected.
> So the full revised list is: "L;LL:LU;LLU".
Agreed. It might be reasonable to add the above as some extra test cases for the CERT check if they're not already covered elsewhere.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D52670
More information about the cfe-commits
mailing list