atirit added inline comments.

================
Comment at: clang/lib/Format/TokenAnnotator.cpp:3683
+        Style.BraceWrapping.AfterEnum;
+    bool isLineTooBig = (strlen(Right.TokenText.data()) +
+                         Right.OriginalColumn) > Style.ColumnLimit;
----------------
curdeius wrote:
> strlen? Please use `StringRef::size()`.
For `FormatToken.TokenText`, `StringRef::size()` is set to the length of the 
token, not of the stored text. Please see 
`clang/lib/Format/FormatTokenLexer.cpp:1047`. Changing that line breaks nearly 
every format test so I'm assuming that it is correct. A `strlen` or equivalent 
is necessary here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93938

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to