dexonsmith added a comment.

In D68914#1710407 <https://reviews.llvm.org/D68914#1710407>, @owenpan wrote:

> I did a quick search of the LLVM code base and found dozens of `const 
> StringRef &`, including the `Twine` API 
> <https://github.com/llvm/llvm-project/blob/master/llvm/include/llvm/ADT/Twine.h#L524>.


`Twine` is "special", don't be influenced by that.  Most of the others are 
probably mistakes.  It's idiomatic to pass `StringRef` by value.


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

https://reviews.llvm.org/D68914



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

Reply via email to