[PATCH] D49722: [CStringSyntaxChecker] Check strlcat sizeof check
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 22 21:33:19 PDT 2018
devnexen added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp:275
+ os << "sizeof(" << DstName << ")";
+ else
+ os << "sizeof(<destination buffer>)";
----------------
MaskRay wrote:
> Why can't this `else if` case be folded into the `strlcpy` case? There are lots of duplication.
>
> `strlcpy` does not check `DstName.empty()` but this one does. Is there any cases I am missing?
strlcpy does but agreed with your first statement, this handling case for both are more different than my initial plan defined them.
https://reviews.llvm.org/D49722
More information about the llvm-commits
mailing list