balazske added a comment. A related question: Is it better to have a more generic function like this:
void CStringChecker::evalMemmove(CheckerContext &C, const CallExpr *CE, bool IsRestricted, bool IsMempcpy, bool IsWide) const { // void *memmove(void *dst, const void *src, size_t n); // The return value is the address of the destination buffer. DestinationArgExpr Dest = {CE->getArg(0), 0}; SourceArgExpr Src = {CE->getArg(1), 1}; SizeArgExpr Size = {CE->getArg(2), 2}; evalCopyCommon(C, CE, C.getState(), Size, Dest, Src, IsRestricted, IsMempcpy, IsWide); } (Instead of `bool` enums can be used.) Or make additional versions of the eval functions and remove the `IsWide` argument (this is even more code repetition)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130470/new/ https://reviews.llvm.org/D130470 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits