Can anyone suggest some APIs in Clang that particularly need StringRef’izing?
ZJ
Can anyone suggest some APIs in Clang that particularly need StringRef’izing?
ZJ
I'd suggest looking for places that use std::string. C++ strings are about as expensive as StringRefs to build from a char*, and (IIRC) aren't stack-based if you mutate them (unlike llvm::SmallString).
In addition, methods that have std::string or const char * /arguments/ are probably more interesting than those that have std::string or const char * /return values/. A return value is just delaying a conversion until later, but an argument could be forcing a conversion that isn't necessary. (Of course, if a string is in StringRef form and then is returned as a std::string, that's just as bad.)
It's definitely cool that you're doing this, but if you get bored, you can always look for low-hanging fruit in Bugzilla (http://llvm.org/bugs) to give yourself an excuse to learn about a specific part of Clang. (That's how I got started. *grin*)
Jordy