[PATCH] D121758: [clang-format] Add support for formatting Verilog code
Krasimir Georgiev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 16 02:47:16 PDT 2022
krasimir added inline comments.
================
Comment at: clang/lib/Format/Format.cpp:3451
+ for (auto Suffix : Lang.second)
+ if (FileName.endswith(Suffix))
+ return Lang.first;
----------------
I kinda prefer the old style of handling this I find it simpler to read. I'd be OK if getAssumeFilenameHelp didn't print the mapping. Also the suffix array has a bit implicit semantics going on that it will be the first suffix matching, which isn't immediately clear in isolation.
Also it looks like this changes behavior: in the old case, some of the matches were case-insensitive.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121758/new/
https://reviews.llvm.org/D121758
More information about the cfe-commits
mailing list