LegalizeAdulthood added inline comments.
================
Comment at:
clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp:83-105
+bool isConstantToken(const MacroDirective *MD) {
+ for (const auto &Token : MD->getMacroInfo()->tokens()) {
+ switch (Token.getKind()) {
+ case tok::comment:
+ case tok::numeric_constant:
+ case tok::char_constant:
+ case tok::wide_char_constant:
----------------
In the spirit of "avoid raw loops", would this be clearer expressed as
std::all_of and the switch/case provided as a lambda?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116386/new/
https://reviews.llvm.org/D116386
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits