[PATCH] D55226: [Fix][StaticAnalyzer] Bug 39792 - False positive on strcpy targeting struct member

Pierre van Houtryve via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 3 11:19:09 PST 2018


Pierre-vh added a comment.

In D55226#1317083 <https://reviews.llvm.org/D55226#1317083>, @george.karpenkov wrote:

> Thank you for the fix, but how far can the pattern matching go? Seems easy enough to think of cases not covered by the above.
>  In any case, the fix looks good.


Hey,

Sadly I'm not experienced enough to think of every case that should pass this check, so I limited myself to just fixing the bug.
Can't we totally remove the outer if so we allow every `Target` expression that has a `ConstantArrayType` to pass this check?

Thank you for your time!


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55226/new/

https://reviews.llvm.org/D55226





More information about the cfe-commits mailing list