I think it makes method implementations more obvious.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 37338 Build 37337: arc lint + arc unit
Event Timeline
LGTM
clang-tools-extra/clang-tidy/GlobList.cpp | ||
---|---|---|
46 | NIT: I suggest using for (;!Globs.empty();) {} to make the stop condition stand out more. |
clang-tools-extra/clang-tidy/GlobList.cpp | ||
---|---|---|
46 | It is actually important for the algorithm to use a do-while loop... The linked-list-based code always parsed at least one glob, even if the input string is empty. Therefore, new loop-based code should also parse at least one glob. I added a doc comment: + /// An empty \p Globs string is interpreted as one glob that matches an empty + /// string. GlobList(StringRef Globs); Please let me know if that is not sufficient. There are also tests for this behavior. |
NIT: I suggest using for (;!Globs.empty();) {} to make the stop condition stand out more.
Not a big deal, though, feel free to keep as is