NoQ added a comment. Thank you, fantastic finding!
> in fact we know it //compile time// Yeah, but is it accidental or is there a good reason behind always having this information at compile time? 'Cause i don't want to restrict the code to always provide this information at compile time if we're not sure it'll always be able to provide it in compile time. My mental model for this sort of stuff is something like this: CallDescriptionMap M = { "malloc", {&MallocChecker::MallocMemAux, AF_Malloc}, "alloca", {&MallocChecker::MallocMemAux, AF_Alloca}, }; void checkPostCall(const CallEvent &Call, CheckerContext &C) { if (Info *I = M.lookup(Call)) I->first(I->second, C, Call); } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68162/new/ https://reviews.llvm.org/D68162 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits