[clang] [Clang][NFC] Capture by ref to avoid copying std::string (PR #138231)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Fri May 2 13:39:12 PDT 2025
shafik wrote:
> Makes sense, thanks. I just wonder why is BName an owning string? To me it would make a lot more sense if it was a StringRef owned by the ASTContext. WDYT?
`FD->getASTContext().BuiltinInfo.getName(BId)` returns std::string by value, looking at the API it looks pretty purposeful. Definitely outside the scope of this kind of change.
https://github.com/llvm/llvm-project/pull/138231
More information about the cfe-commits
mailing list