[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
Tue Apr 26 20:32:09 PDT 2022
LegalizeAdulthood added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/modernize/IntegralLiteralExpressionMatcher.cpp:1
+#include "IntegralLiteralExpressionMatcher.h"
+
----------------
ditto
================
Comment at: clang-tools-extra/clang-tidy/modernize/IntegralLiteralExpressionMatcher.cpp:292
+
+bool IntegralLiteralExpressionMatcher::conditionalExpr() {
+ if (!logicalOrExpr())
----------------
Structure of these feels very similar, I'll see if I can squish out the duplication
================
Comment at: clang-tools-extra/clang-tidy/modernize/IntegralLiteralExpressionMatcher.h:1
+#pragma once
+
----------------
Uh.... I guess this needs some sort of copyright notice?
================
Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:325
+ IntegralLiteralExpressionMatcher Matcher(MacroTokens);
+ bool matched = Matcher.match();
+ return matched;
----------------
inline variable made explicit for debugging
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124500/new/
https://reviews.llvm.org/D124500
More information about the cfe-commits
mailing list