This change refactors the MuiltiplexExternalSemaSource to take ownership
of the underlying sources. As a result it makes a larger cleanup of
external source ownership in Sema and the ChainedIncludesSource.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/include/clang/Sema/MultiplexExternalSemaSource.h | ||
---|---|---|
52 | why this change? Does & imply ownership in our coding style? |
clang/include/clang/Sema/MultiplexExternalSemaSource.h | ||
---|---|---|
52 | The old implementation took the address of the references to store. It seems more clear to me to accept a pointer when you need a pointer. The old interface using references also allowed for passing in stack-allocated objects, which causes problems since the change here calls retain and release on the underlying ref count object. Taking pointers puts the onus on the user of the API to think through where the address passed in comes from. |
This looks plausible to me — did you build clang-tools-extra & lldb to make sure nothing else needs to be updated?
clang/include/clang/Sema/MultiplexExternalSemaSource.h | ||
---|---|---|
52 | nit: clang-format :-) |
I built LLDB and ran its tests. I see no additional failures after applying my change, but LLDB's tests do not execute successfully on my local system (22 failures).
why this change? Does & imply ownership in our coding style?