xazax.hun created this revision.
xazax.hun added reviewers: zaks.anna, dcoughlin.
xazax.hun added subscribers: cfe-commits, dkrupp.
This patch adds a small utility to match function calls and Obj-C messages.
This utility abstracts away the mutable keywords and the lazy initialization
and caching
ariccio added a subscriber: ariccio.
ariccio added a comment.
Side note: Has anybody ever considered just treating `fopen` and `fclose` like
`malloc` and `free`?
On Windows I use a trick that I discovered what I call "the
`_Post_ptr_invalid_` hack" because* the `_Post_ptr_invalid_` SAL annotati
zaks.anna added a comment.
> Side note: Has anybody ever considered just treating fopen and fclose like
> malloc and free?
Yes, there are a few checkers that follow the same open/close rule and could in
theory be merged together.
Comment at: cfe/trunk/lib/StaticAnalyzer/Chec
zaks.anna added inline comments.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:309
@@ -286,1 +308,3 @@
+ /// \brief Returns true if the CallEvent is call to a function that matches
+ /// the CallDescription.
"is call" -> "is a ca
xazax.hun updated this revision to Diff 44322.
xazax.hun marked 4 inline comments as done.
xazax.hun added a comment.
- Removed support for matching ObjC messages. It might be added in a later.
- Addressed review comments.
http://reviews.llvm.org/D15921
Files:
include/clang/StaticAnalyzer/Cor
xazax.hun updated this revision to Diff 44325.
xazax.hun added a comment.
Updated the comments.
http://reviews.llvm.org/D15921
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
lib/StaticAnalyzer/Core/CheckerContext
zaks.anna added inline comments.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:312
@@ +311,3 @@
+ /// calls.
+ bool isCalled(const CallEvent &Call, const CallDescription &CD);
+
The API is a bit awkward. Maybe it would be better if
xazax.hun updated this revision to Diff 44721.
xazax.hun added a comment.
- Moved the API to CallEvent.
http://reviews.llvm.org/D15921
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
lib/StaticAnalyzer/Core/CallEvent.c
xazax.hun marked an inline comment as done.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:312
@@ +311,3 @@
+ /// calls.
+ bool isCalled(const CallEvent &Call, const CallDescription &CD);
+
zaks.anna wrote:
> The API is a bit awkwar
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
LGTM
http://reviews.llvm.org/D15921
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/
This revision was automatically updated to reflect the committed changes.
Closed by commit rL258572: [analyzer] Utility to match function calls.
(authored by xazax).
Changed prior to commit:
http://reviews.llvm.org/D15921?vs=44721&id=45748#toc
Repository:
rL LLVM
http://reviews.llvm.org/D15
krasin added a subscriber: krasin.
krasin added a comment.
FYI: this revision has likely broken the build:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/9561
FAIL: Clang :: Analysis/simple-stream-checks.c (367 of 8927)
- TEST 'Clang :: Analysis/simple-stream-checks.c' FAI
zaks.anna added a comment.
Looks like the 'II' pointer wasn't initialized. Should be fixed by r258591.
Repository:
rL LLVM
http://reviews.llvm.org/D15921
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailma
xazax.hun marked an inline comment as done.
xazax.hun added a comment.
Thank you for the fix and sorry for not noticing this. I was unlucky and the
tests did pass on my machine.
Repository:
rL LLVM
http://reviews.llvm.org/D15921
___
cfe-commits
14 matches
Mail list logo