[clang] [libclang] Replace createRef with createDup (PR #126683)

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 25 15:04:55 PST 2025


vitalybuka wrote:

> Requesting changes just to be sure none of the changes from `createRef()` to `createDup()` would have generated a `StringRef` holding a null pointer. I'd be surprised if they did, but a second set of eyes would be helpful.

I am not sure how to proceed here.
This change was requested by @efriedma-quic on #125020

I see 3 options:
1. Land as-is, but then we would not differentiate `createNull()` vs `createEmpty()` vs `createDup()`. No idea if this difference is important.
2. Move checks into `createDup()`, but then `createDup()` is not always a "Dup". Also no idead if this is important.
3. Just abandon the patch.

WDYT?



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


More information about the cfe-commits mailing list