[PATCH] D36441: Add Support for Reference Counting of Parameters on the Callee Side in RetainCountChecker

2017-08-16 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 111420. malhar1995 added a comment. This patch adds the functionality of performing reference counting on the callee side for Integer Set Library (ISL) to Clang Static Analyzer's RetainCountChecker. Reference counting on the callee side can be

[PATCH] D36441: Add Support for Reference Counting of Parameters on the Callee Side in RetainCountChecker

2017-08-09 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 110514. malhar1995 marked 7 inline comments as done. malhar1995 added a comment. Addressed comments. P.S: I'm yet to test this callee-side parameter checking functionality on the actual ISL codebase. I'll do that ASAP. Repository: rL LLVM

[PATCH] D36441: Add Support for Reference Counting of Parameters on the Callee Side in RetainCountChecker

2017-08-07 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 added inline comments. Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:2521-2523 + deriveAllocLocation(Ctx, sym); + if (!AllocBinding) +deriveParamLocation(Ctx, sym); I'm not sure what difference it will make if I change the

[PATCH] D36441: Add Support for Reference Counting of Parameters on the Callee Side in RetainCountChecker

2017-08-07 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 created this revision. Herald added a subscriber: eraman. Current RetainCountChecker performs reference counting of function arguments/parameters only on the caller side and not on the callee side. This patch aims to add support for reference counting on the callee-side for objects

[PATCH] D35613: Add Support for Generic Reference Counting Annotations in RetainCountChecker

2017-07-22 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 added a comment. @dcoughlin Ping. Repository: rL LLVM https://reviews.llvm.org/D35613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35613: Add Support for Generic Reference Counting Annotations in RetainCountChecker

2017-07-20 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 107471. malhar1995 added a comment. Removed the checks to see if the symbol type is NULL while printing diagnostics as they are unnecessary. Repository: rL LLVM https://reviews.llvm.org/D35613 Files:

[PATCH] D35613: Add Support for Generic Reference Counting Annotations in RetainCountChecker

2017-07-20 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 added inline comments. Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:2012 + } else if (CurrV.getObjKind() == RetEffect::GenericC) { +if (Sym->getType().isNull()) { + os << " returns an object with a "; NoQ wrote:

[PATCH] D35613: Add Support for Generic Reference Counting Annotations in RetainCountChecker

2017-07-19 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 107347. malhar1995 added a comment. Addressed all comments except the one where I had to remove the test to see if the return type was null while emitting diagnostics. Repository: rL LLVM https://reviews.llvm.org/D35613 Files:

[PATCH] D35613: Add Support for Generic Reference Counting Annotations in RetainCountChecker

2017-07-19 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 created this revision. malhar1995 added a project: clang. As part of my Google Summer of Code project, I am working on adding support for Integer Set Library (ISL) annotations to the current RetainCountChecker. Note about ISL: ISL has annotations __isl_give and __isl_take which are

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-18 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 107020. malhar1995 added a comment. Added isTrustedReferenceCountAnnotation() again. Repository: rL LLVM https://reviews.llvm.org/D34937 Files: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp test/Analysis/retain-release-inline.m Index:

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-17 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 106911. malhar1995 added a comment. Addressed comments. Changed the function from isTrustedReferenceCountImplementation() to hasRCAnnotation() (I'm unable to come up with a better name) as this will be useful when I add support to RetainCountChecker to

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-17 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 added a comment. In https://reviews.llvm.org/D34937#811500, @dcoughlin wrote: > Looks good to me, other than a nit on indentation and a request for a little > bit more info in a comment! Currently, I have added support for generic annotations for __isl_take and __isl_give and I

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-15 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 106765. malhar1995 added a comment. Checked for "trusted" annotation on the function declaration corresponding to the function definition. Repository: rL LLVM https://reviews.llvm.org/D34937 Files:

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-14 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 106685. malhar1995 added a comment. Suppresses false positives involving functions which perform reference counting. Added relevant test-cases to test/Analysis/retain-release-inline.m https://reviews.llvm.org/D34937 Files:

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-05 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 105292. malhar1995 added a comment. Corrected one of the two test-cases added in the last-diff. Repository: rL LLVM https://reviews.llvm.org/D34937 Files: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp test/Analysis/retain-release-inline.m

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-05 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 added a comment. In https://reviews.llvm.org/D34937#799504, @dcoughlin wrote: > Thanks for the tests. > > Have you tried this on the ISL codebase to make sure it is suppressing the > diagnostics in related to reference counting implementation that you expect? > > I think it would be

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-05 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 105186. malhar1995 added a comment. Added relevant test-cases to verify the added functionality. Repository: rL LLVM https://reviews.llvm.org/D34937 Files: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp test/Analysis/retain-release-inline.m

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-05 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 105160. malhar1995 added a comment. Herald added a subscriber: eraman. Changed function name from 'isAnnotatedToSkipDiagnostics' to 'isTrustedReferenceCountImplementation'. Added some test-cases to test/Analysis/retain-release-inline.m. Applied

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-03 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 created this revision. As part of my Google Summer of Code project, I am working on adding support for Integer Set Library (ISL) annotations to the current RetainCountChecker. Hence, to begin with, Dr. Devin Coughlin gave me a task to suppress reference counting diagnostics for all

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-03 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 105043. Repository: rL LLVM https://reviews.llvm.org/D34937 Files: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp Index: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp === ---

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-05-22 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 99750. malhar1995 added a comment. Addressed previous comments (removed Schrodinger from lock state names, changed method name setAppropriateLockState to resolvePossiblyDestroyedMutex, added an assert in resolvePossiblyDestroyedMutex, formatted the code

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-05-20 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 added inline comments. Comment at: lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp:143-146 +if(lstate->isSchrodingerUntouched()) + state = state->remove(lockR); +else if(lstate->isSchrodingerUnlocked()) + state = state->set(lockR,

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-05-20 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 marked 2 inline comments as done. malhar1995 added a comment. In https://reviews.llvm.org/D32449#760141, @NoQ wrote: > Thanks! Your code looks very clear now, and it seems correct to me. > > One last thing we definitely should do here would be add regression tests for > the new

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-05-17 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 99388. malhar1995 marked an inline comment as done. malhar1995 added a comment. Cleaned up the previous patch. Added checking of LockState before initializing a mutex as well. Added separate branches of execution for PthreadSemantics and XNUSemantics.

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-05-16 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 99179. malhar1995 added a comment. Added context. Also, I removed the inclusion of iostream and also added the repetitive code to the function setAppropriateLockState. Currently working on finding various corner cases and invariants. Repository: rL

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-04-24 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 created this revision. I am currently working on to avoid false positives which currently occur as the return values of mutex functions like pthread_mutex_destroy() are not taken into consideration. The precise description of the bug can be found here: