Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM in principle.
That said, I don't think StringRef buys us anything here as none of this code is in the hot path. It also comes with the downside that now one has to worry about lifetimes of the strings we refer to. Things do look OK in this case, but it would be good if it could be confirmed with sanitizer.
In code that's not performance critical I personally prefer passing std::string by value and let compiler optimize them away.