[PATCH] D117398: [clang-format] Fix bug in parsing `operator<` with template

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 17 09:43:53 PST 2022


MyDeveloperDay added inline comments.


================
Comment at: clang/lib/Format/FormatTokenLexer.cpp:432
 
+  auto Forth = (Tokens.end() - 4)[0];
   bool FourthTokenIsLess = false;
----------------
isn't this going to crash if Tokens.size() is 3?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117398/new/

https://reviews.llvm.org/D117398



More information about the cfe-commits mailing list