[PATCH] D124500: [clang-tidy] Support expressions of literals in modernize-macro-to-enum

Richard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 29 13:02:05 PDT 2022


LegalizeAdulthood marked 3 inline comments as done.
LegalizeAdulthood added inline comments.


================
Comment at: clang-tools-extra/unittests/clang-tidy/ModernizeModuleTest.cpp:66
+    {false, "1.23"},
+    {false, "0x1p3"},
+    {false, R"("string")"},
----------------
LegalizeAdulthood wrote:
> aaron.ballman wrote:
> > ```
> > 12i
> > .0
> > ```
> > 
> `.0` is already covered by the case `1.23`.  I'm not home brewing tokenization, but using the Lexer to do that.
> 
> `12i` I need to investigate to find out what the Lexer does.
OK, so `12i` turns into `numeric_constant` token, so I've added test cases to exclude those and enhanced the matcher.

Essentially that's a bug in the existing implementation that `12i` wasn't rejected outright.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124500/new/

https://reviews.llvm.org/D124500



More information about the cfe-commits mailing list