1 .. title:: clang-tidy - readability-uppercase-literal-suffix
3 readability-uppercase-literal-suffix
4 ====================================
6 `cert-dcl16-c` redirects here as an alias for this check.
7 By default, only the suffixes that begin with ``l`` (``l``, ``ll``, ``lu``,
8 ``llu``, but not ``u``, ``ul``, ``ull``) are diagnosed by that alias.
10 `hicpp-uppercase-literal-suffix` redirects here as an alias for this check.
12 Detects when the integral literal or floating point (decimal or hexadecimal)
13 literal has a non-uppercase suffix and provides a fix-it hint with the uppercase
16 All valid combinations of suffixes are supported.
20 auto x = 1; // OK, no suffix.
22 auto x = 1u; // warning: integer literal suffix 'u' is not upper-case
24 auto x = 1U; // OK, suffix is uppercase.
31 .. option:: NewSuffixes
33 Optionally, a list of the destination suffixes can be provided. When the
34 suffix is found, a case-insensitive lookup in that list is made, and if a
35 replacement is found that is different from the current suffix, then the
36 diagnostic is issued. This allows for fine-grained control of what suffixes to
37 consider and what their replacements should be.
45 * ``L`` will be kept as is.
49 * ``uL`` will be kept as is.
50 * ``ull`` will be kept as is, since it is not in the list
53 .. option:: IgnoreMacros
55 If this option is set to `true` (default is `true`), the check will not warn
56 about literal suffixes inside macros.