This revision was automatically updated to reflect the committed changes.
Closed by commit rL297153: [analyzer] Improve valist checks and move it out
from alpha state. (authored by xazax).
Changed prior to commit:
https://reviews.llvm.org/D30157?vs=90676&id=90855#toc
Repository:
rL LLVM
htt
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
It's great to see things move out of alpha and finally become actually
accessible to the majority of users. Thanks!
https://reviews.llvm.org/D30157
__
xazax.hun added a comment.
In https://reviews.llvm.org/D30157#689374, @danielmarjamaki wrote:
> I am running this checker right now on various projects. Here are currently
> seen results.. https://drive.google.com/open?id=0BykPmWrCOxt2STZMOXZ5OGlwM3c
>
> Feel free to look at it and see if there
xazax.hun updated this revision to Diff 90676.
xazax.hun marked an inline comment as done.
xazax.hun added a comment.
- Improve the readability of test files.
- Rebased on latest ToT.
https://reviews.llvm.org/D30157
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer
zaks.anna added inline comments.
Comment at: test/Analysis/valist-uninitialized-no-undef.c:25
+ va_list va;
+ vprintf(isstring ? "%s" : "%d", va); //expected-warning{{Function 'vprintf'
is called with an uninitialized va_list argument}} expected-note{{Function
'vprintf' is ca
danielmarjamaki added a comment.
I am running this checker right now on various projects. Here are currently
seen results.. https://drive.google.com/open?id=0BykPmWrCOxt2STZMOXZ5OGlwM3c
Feel free to look at it and see if there are FPs or TPs.
https://reviews.llvm.org/D30157
xazax.hun updated this revision to Diff 89857.
xazax.hun edited the summary of this revision.
xazax.hun added a comment.
- Move the check out of alpha.
https://reviews.llvm.org/D30157
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/ValistChecker.cpp
te
xazax.hun updated this revision to Diff 89780.
xazax.hun added a comment.
- Minor style improvement.
https://reviews.llvm.org/D30157
Files:
lib/StaticAnalyzer/Checkers/ValistChecker.cpp
test/Analysis/valist-uninitialized-no-undef.c
test/Analysis/valist-uninitialized.c
test/Analysis/vali
danielmarjamaki added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/ValistChecker.cpp:189
+ const auto *EReg = dyn_cast_or_null(Reg);
+ return EReg && VaListModelledAsArray ? EReg->getSuperRegion() : Reg;
+}
I would personally recommend parentheses a
xazax.hun added inline comments.
Comment at: test/Analysis/valist-uninitialized-no-undef.c:19
+ // FIXME: There should be no warning for this.
+ (void)va_arg(*fst, int); // expected-warning{{va_arg() is called on an
uninitialized va_list}} expected-note{{va_arg() is called on
xazax.hun updated this revision to Diff 89187.
xazax.hun marked 3 inline comments as done.
xazax.hun added a comment.
- Fixed a comment.
https://reviews.llvm.org/D30157
Files:
lib/StaticAnalyzer/Checkers/ValistChecker.cpp
test/Analysis/valist-uninitialized-no-undef.c
test/Analysis/valist-
xazax.hun marked 3 inline comments as done.
xazax.hun added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/ValistChecker.cpp:178
+VaListModelledAsArray = Cast->getCastKind() == CK_ArrayToPointerDecay;
+ const MemRegion *Reg = SV.getAsRegion();
+ if (const auto *De
xazax.hun updated this revision to Diff 89185.
xazax.hun added a comment.
- Address some review comments.
- Add some additional tests.
- Fixed some false positives (checking for symbolic values for va_copy and more
robust detection of which valist model is used by the platform)
- I have run the c
NoQ added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/ValistChecker.cpp:178
+VaListModelledAsArray = Cast->getCastKind() == CK_ArrayToPointerDecay;
+ const MemRegion *Reg = SV.getAsRegion();
+ if (const auto *DeclReg = Reg->getAs()) {
I suspect
xazax.hun created this revision.
This patch makes the valist check more robust to the different kind of ASTs
that are generated on different platforms:
Generated on x86_64-pc-linux-gnu:
|-TypedefDecl 0x1d07a40 <> implicit
__builtin_ms_va_list 'char *'
| `-PointerType 0x1d07a00 'char *'
15 matches
Mail list logo