[all-commits] [llvm/llvm-project] d563c2: [clang-tidy] Support parenthesized literals in mod...
Richard Thomson via All-commits
all-commits at lists.llvm.org
Mon Apr 11 13:08:55 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d563c2d0e52a738ab2038db02a76dc4c27ec7124
https://github.com/llvm/llvm-project/commit/d563c2d0e52a738ab2038db02a76dc4c27ec7124
Author: Richard <legalize at xmission.com>
Date: 2022-04-11 (Mon, 11 Apr 2022)
Changed paths:
M clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp
M clang-tools-extra/docs/clang-tidy/checks/modernize-macro-to-enum.rst
M clang-tools-extra/test/clang-tidy/checkers/modernize-macro-to-enum.cpp
Log Message:
-----------
[clang-tidy] Support parenthesized literals in modernize-macro-to-enum
When scanning a macro expansion to examine it as a candidate enum,
first strip off arbitrary matching parentheses from the outside in,
then examine what remains to see if it is Lit, +Lit, -Lit or ~Lit.
If not, reject it as a possible enum candidate.
Differential Revision: https://reviews.llvm.org/D123479
Fixes #54843
More information about the All-commits
mailing list