[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 06:10:44 PDT 2018


aaron.ballman added a comment.

In https://reviews.llvm.org/D52670#1268170, @lebedev.ri wrote:

> - Apply minor wording nits.
> - For `cert-dcl16-c`, **only** consider `L`, `LL` suffixes, not **anything** else (not even `llu`).


I'll find out about the DCL16-C recommendation, as I suspect the intent is to cover `lu` and `llu` but not `ul` and `ull`. I've pinged the authors and can hopefully get an answer quickly, but if not, I'm fine with fixing that after the patch goes in.



================
Comment at: clang-tidy/cert/CERTTidyModule.cpp:87
+    ClangTidyOptions Options;
+    auto &Opts = Options.CheckOptions;
+    Opts["cert-dcl16-c.NewSuffixes"] = "L;LL";
----------------
Don't use `auto` here.


================
Comment at: docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst:6
+
+`cert-dcl16-c` redirects here as an alias for this check.
+
----------------
You should consider calling out the CERT behavioral differences.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52670





More information about the cfe-commits mailing list