[clang] [clang-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 13:01:33 PST 2025


https://github.com/nikic commented:

I think StringLiteral is often used as an additional safety net, to ensure(*) that only string literals get passed and we don't end up with dangling pointers. This is especially useful when migrating some code from using an owned to an unowned string.

(*) It doesn't strictly ensure that, but good enough for all practical purposes.

https://github.com/llvm/llvm-project/pull/122366


More information about the cfe-commits mailing list