NoQ added a comment.
Sorry, i completely forgot about this one :(
I think this patch needs `lit` tests, eg. tell the analyzer to analyze a simple
strcpy() call on any `-target` with non-8-bit chars and see if it's still
crashes or behaves incorrectly.
Comment at: lib/StaticA
leanil added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:517
if (const auto *Array = dyn_cast(DeclRef->getType())) {
- uint64_t ArraySize = BR.getContext().getTypeSize(Array) / 8;
+ auto ArraySize = BR.getContext().getTypeSi
NoQ added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:517
if (const auto *Array = dyn_cast(DeclRef->getType())) {
- uint64_t ArraySize = BR.getContext().getTypeSize(Array) / 8;
+ auto ArraySize = BR.getContext().getTypeSizeI
xazax.hun accepted this revision.
xazax.hun added a comment.
This revision is now accepted and ready to land.
LGTM!
https://reviews.llvm.org/D43928
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinf
leanil updated this revision to Diff 136474.
leanil added a comment.
`getQuantity()` returns a signed type
https://reviews.llvm.org/D43928
Files:
lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
Index: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
==
leanil created this revision.
leanil added reviewers: dcoughlin, xazax.hun, NoQ.
Herald added subscribers: a.sidorin, rnkovacs, szepet.
Herald added a reviewer: george.karpenkov.
This will handle those platforms that don't have 8-bit chars.
This is a follow up fix to review https://reviews.llvm.or