[clang] [clang-tools-extra] [clang] Do not share ownership of `PreprocessorOptions` (PR #133467)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 28 10:23:24 PDT 2025


benlangmuir wrote:

Are you planning to do the same for LangOpts and HSOpts? What's the ultimate goal here?

There's also this comment on `CompilerInvocationBase`:
```
/// ... It keeps individual option objects
/// behind reference-counted pointers, which is useful for clients that want to
/// keep select option objects alive (even after CompilerInvocation gets
/// destroyed) without making a copy.
```

Which only makes sense if these `shared_ptr`s are exposed somewhere.

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


More information about the cfe-commits mailing list