aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM aside from some minor nits (also, please run clang-format over the patch before landing).
================ Comment at: clang/lib/Sema/MultiplexExternalSemaSource.cpp:32 +MultiplexExternalSemaSource::~MultiplexExternalSemaSource() { + for (auto &S : Sources) + S->Release(); ---------------- ================ Comment at: clang/lib/Sema/Sema.cpp:548 - if (isMultiplexExternalSource) - static_cast<MultiplexExternalSemaSource*>(ExternalSource)->addSource(*E); - else { - ExternalSource = new MultiplexExternalSemaSource(*ExternalSource, *E); - isMultiplexExternalSource = true; - } + if (auto Ex = dyn_cast<MultiplexExternalSemaSource>(ExternalSource)) + Ex->AddSource(E); ---------------- Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133158/new/ https://reviews.llvm.org/D133158 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits