[clang] [SSAF][Extractor][Do not merge] Extract operator new/delete overload entities that shall retain their types (PR #206600)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 04:16:45 PDT 2026


================
@@ -104,29 +104,33 @@ template <typename ExtractorFnT>
 void extractAndAddSummaries(TUSummaryExtractor &Extractor,
                             TUSummaryBuilder &Builder, ASTContext &Ctx,
                             ExtractorFnT ExtractFn,
-                            const char *ExtractorName = "") {
+                            llvm::StringRef ExtractorName = {}) {
   llvm::DenseMap<const NamedDecl *, std::vector<const NamedDecl *>>
       Contributors;
   findContributors(Ctx, Contributors);
   for (const auto &[Cano, Decls] : Contributors) {
+    assert(Decls.size() > 0 && !Decls[0]->isImplicit() &&
+           "guaranteed by 'findContributors'");
----------------
steakhal wrote:

IMO asserts should check one thing at a time - otherwise it's impossible to know what part of the assert failed.

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


More information about the cfe-commits mailing list