I’m hoping to learn more about clang / LLVM, and I figured the best way to do so would be to jump in and make some changes to the code. The llvm::StringRef-ization project seems to be open. Is anyone currently working on this? If not, I would like to take a stab at it.
Go for it. Also keep an eye out for functions taking a pointer+length (e.g.
foo(Bar *Elts, unsigned NumElts)) which can be replaced with ArrayRef.
I played around with this when I started contributing a few years ago.
I kind of got stuck trying to figure out how best to refactor APIs
between c-strings, StringRef, and Twine. I was/would rather hope that
we could change APIs to use Twine pervasively, but it does mean a
little extra code overhead for each parameter that actually needs to
be manifest (calling toStringRef and having the necessary SmallString
buffer declared too). If you search the mailing list archives you
might find some of this discussion.
Honestly it's probably overkill & just StringRefizing APIs would be
general goodness - I just got stuck on wondering how to be 'perfect'.