================
@@ -3246,8 +3246,15 @@ tooling::Replacements sortCppIncludes(const FormatStyle
&Style, StringRef Code,
SmallVector<StringRef, 2> RawStringMatches;
std::string RawStringTermination = ")\"";
- for (;;) {
- auto Pos = Code.find('\n', SearchFrom);
+ for (const auto Size = Code.size(); SearchFrom < Size;) {
----------------
rymiel wrote:
Why is the extra `Size` variable needed? Why can't it stay as `for (;;)` ?
https://github.com/llvm/llvm-project/pull/120680
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits