Charusso added inline comments.
================ Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:1548 - state = checkNonNull(C, state, Dst, DstVal); + state = checkNonNull(C, state, Dst, DstVal, 1); if (!state) ---------------- bruntib wrote: > NoQ wrote: > > You could also pass a description of the parameter (eg., "source" or > > "destination"). > Could you please give some hint, how to include this in the message? I don't > know how to do it concisely. I have made this for that purpose: ``` struct CallContext { CallContext(Optional<unsigned> DestinationPos, Optional<unsigned> SourcePos = None, Optional<unsigned> LengthPos = None) : DestinationPos(DestinationPos), SourcePos(SourcePos), LengthPos(LengthPos) {}; Optional<unsigned> DestinationPos; Optional<unsigned> SourcePos; Optional<unsigned> LengthPos; }; ``` ``` // char *strcpy(char *dest, const char *src); {{CDF_MaybeBuiltin, "stpcpy", 2}, {&CStringChecker::evalStpcpy, {0, 1}}}, ``` May it helps. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66333/new/ https://reviews.llvm.org/D66333 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits