[PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-06 Thread Gábor Horváth via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-03-05 Thread Alexander Riccio via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-03-07 Thread Anna Zaks via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-06 Thread Anna Zaks via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-08 Thread Gábor Horváth via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-08 Thread Gábor Horváth via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-11 Thread Anna Zaks via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-13 Thread Gábor Horváth via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-13 Thread Gábor Horváth via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-20 Thread Anna Zaks via cfe-commits
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/

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-22 Thread Phabricator via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-22 Thread Ivan Krasin via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-22 Thread Anna Zaks via cfe-commits
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

Re: [PATCH] D15921: [analyzer] Utility to match function calls.

2016-01-23 Thread Gábor Horváth via cfe-commits
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