DmitryPolukhin added inline comments.

================
Comment at: llvm/lib/Support/YAMLTraits.cpp:894
+                                           std::string &Val) {
+  Val.clear();
+  size_t CurrentPos = 0;
----------------
njames93 wrote:
> If you want to do the same here...
> ```
>   SmallVector<StringRef, 8> Lines;
>   Scalar.split(Lines, "\n\n");
>   Val = llvm::join(Lines, "\n");
>   return StringRef();```
Personally I don't like approach with string split because it is potentially 
less efficient due to memory allocations in case of multiple newlines that can 
be avoided. BUT I would like to move the needle and fix this real bug in clang 
ASAP. So I'm ready to rewrite it to something that (1) works and (2) moves 
review forward. So thank you for review and please take another look.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80301



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

Reply via email to