================
@@ -800,10 +800,11 @@ void FormatStringConverter::applyFixes(DiagnosticBuilder
&Diag,
}
for (const auto &[ArgIndex, Replacement] : ArgFixes) {
- const SourceLocation AfterOtherSide =
-
utils::lexer::findNextTokenSkippingComments(Args[ArgIndex]->getEndLoc(),
- SM, LangOpts)
- ->getLocation();
+ const auto NextToken = utils::lexer::findNextTokenSkippingComments(
+ Args[ArgIndex]->getEndLoc(), SM, LangOpts);
+ if (!NextToken)
+ continue;
----------------
zeyi2 wrote:
> We can probably land "easy" part of unchecked-optional-access that can
> prevent real crashes.
I think that PR is almost "finished", IMO after reverting the last commit and
resolving conflicts it would be ready for merging? I will work on it later.
https://github.com/llvm/llvm-project/pull/176684
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits