summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/objc_invalidation.m
Commit message (Collapse)AuthorAgeFilesLines
* Reland 4: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-031-2/+2
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296895
* Revert "Reland 3: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-03-021-2/+2
| | | | | | | | multiple constraint managers" This reverts commit ea36f1406e1f36bf456c3f3929839b024128e468. llvm-svn: 296841
* Reland 3: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-021-2/+2
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296837
* Revert "Reland 2: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-03-021-2/+2
| | | | | | | | multiple constraint managers" This reverts commit f93343c099fff646a2314cc7f4925833708298b1. llvm-svn: 296836
* Reland 2: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-021-2/+2
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296835
* Revert "Reland: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-02-281-2/+2
| | | | | | | | multiple constraint managers" This reverts commit 1b28d0b10e1c8feccb971abb6ef7a18bee589830. llvm-svn: 296422
* Reland: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-02-281-2/+2
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296414
* Revert "[analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-02-271-2/+2
| | | | | | | | constraint managers" This reverts commit 8e7780b9e59ddaad1800baf533058d2c064d4787. llvm-svn: 296317
* [analyzer] NFC: Update test infrastructure to support multiple constraint ↵Dominic Chen2017-02-271-2/+2
| | | | | | | | | | | | | | managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296312
* Objective-C [qoi]. If property is going to be implementedFariborz Jahanian2014-08-291-2/+2
| | | | | | | | in the super class, do not issue the warning about property in current class's protocol will not be auto synthesized. // rdar://18179833 llvm-svn: 216769
* Objective-C. Tweak diagnosing properties that are not auto-synthesized.Fariborz Jahanian2014-08-291-2/+2
| | | | | | | | | | | Do not warn when property declared in class's protocol will be auto-synthesized by its uper class implementation because super class has also declared this property while this class has not. Continue to warn if current class has declared the property also (because this declaration will not result in a 2nd synthesis). rdar://18152478 llvm-svn: 216753
* Objective-C. Issue more warning diagnostic when certainFariborz Jahanian2014-07-261-2/+2
| | | | | | | | properties are not synthesized in property auto-synthesis, as it can potentiall lead to runtime errors. rdar://17774815 llvm-svn: 214032
* Replace -fobjc-default-synthesize-properties with ↵Rafael Espindola2013-09-271-2/+2
| | | | | | | | | disable-objc-default-synthesize-properties. We want the modern behavior most of the time, so inverting the option simplifies the driver and the tests. llvm-svn: 191551
* [analyzer] IvarInvalidation: correctly handle cases where only partial ↵Anna Zaks2013-04-241-0/+41
| | | | | | | | | | | | invalidators exist - If only partial invalidators exist and there are no full invalidators in @implementation, report every ivar that has not been invalidated. (Previously, we reported the first Ivar in the list, which could actually have been invalidated by a partial invalidator. The code assumed you cannot have only partial invalidators.) - Do not report missing invalidation method declaration if a partial invalidation method declaration exists. llvm-svn: 180170
* [analyzer] Invalidation checker: move the "missing implementation" checkAnna Zaks2013-02-091-2/+2
| | | | | | | | | | | | The missing definition check should be in the same category as the missing ivar validation - in this case, the intent is to invalidate in the given class, as described in the declaration, but the implementation does not perform the invalidation. Whereas the MissingInvalidationMethod checker checks the cases where the method intention is not to invalidate. The second checker has potential to have a much higher false positive rate. llvm-svn: 174787
* [analyzer] Split IvarInvalidation into two checkersAnna Zaks2013-02-081-16/+32
| | | | | | | Separate the checking for the missing invalidation methods into a separate checker so that it can be turned on/off independently. llvm-svn: 174781
* [analyzer] IvarInvalidation: add annotation for partial invalidationAnna Zaks2013-02-081-6/+72
| | | | | | | | | | | The new annotation allows having methods that only partially invalidate IVars and might not be called from the invalidation methods directly (instead, are guaranteed to be called before the invalidation occurs). The checker is going to trust the programmer to call the partial invalidation method before the invalidator.This is common in cases when partial object tear down happens before the death of the object. llvm-svn: 174779
* [analyzer] Fix warning typo.Anna Zaks2013-01-161-4/+4
| | | | llvm-svn: 172596
* [analyzer] Rename the warning: state the issue before the hint of how itAnna Zaks2013-01-111-4/+4
| | | | | | can be fixed llvm-svn: 172170
* [analyzer]Recognize ivar invalidation protocol even if it was redeclaredAnna Zaks2013-01-111-0/+3
| | | | | | This will get rid of some false positives as well as false negatives. llvm-svn: 172169
* [analyzer] Ivar invalidation: track ivars declared in categories.Anna Zaks2013-01-111-0/+9
| | | | llvm-svn: 172168
* [analyzer] Allow IvarInvalidation checker to suppress warnings viaAnna Zaks2013-01-101-1/+21
| | | | | | | | | | | | assertions. To ensure that custom assertions/conditional would also be supported, just check if the ivar that needs to be invalidated or set to nil is compared against 0. Unfortunately, this will not work for code containing 'assert(IvarName)' llvm-svn: 172147
* [analyzer] Fix non-determinizm introduced in r172104.Anna Zaks2013-01-101-2/+2
| | | | | | | | In some cases, we just pick any ivar that needs invalidation and attach the warning to it. Picking the first from DenseMap of pointer keys was triggering non-deterministic output. llvm-svn: 172134
* [analyzer] Add more checks to the ObjC Ivar Invalidation checker.Anna Zaks2013-01-101-0/+40
| | | | | | | | | | | | | | Restructured the checker so that it could easily find two new classes of issues: - when a class contains an invalidatable ivar, but no declaration of an invalidation method - when a class contains an invalidatable ivar, but no definition of an invalidation method in the @implementation. The second case might trigger some false positives, for example, when the method is defined in a category. llvm-svn: 172104
* [analyzer] Fix a false positive in the ivar invalidation checker.Anna Zaks2013-01-071-0/+29
| | | | | | | | | When a property is "inherited" through both a parent class and directly through a protocol, we should not require the child to invalidate it since the backing ivar belongs to the parent class. (Fixes radar://12913734) llvm-svn: 171769
* [analyzer] Ivar invalidation: identify properties declared in protocols.Anna Zaks2012-10-181-2/+4
| | | | llvm-svn: 166211
* [analyzer] Ivar Invalidation: track ivars in continuations andAnna Zaks2012-10-161-1/+10
| | | | | | @implementation. llvm-svn: 166047
* [analyzer] Re-implement IvarInvalidationChecker so that it verifies thatAnna Zaks2012-09-291-26/+50
| | | | | | | | | | | the validation occurred. The original implementation was pessimistic - we assumed that ivars which escape are invalidated. This version is optimistic, it assumes that the ivars will always be explicitly invalidated: either set to nil or sent an invalidation message. llvm-svn: 164868
* [analyzer] IvarInvalidation: track synthesized ivars and allow escapeAnna Zaks2012-09-271-0/+8
| | | | | | through property getters. llvm-svn: 164802
* [analyzer] Address Jordan's code review comments for r164716.Anna Zaks2012-09-271-6/+9
| | | | llvm-svn: 164788
* [analyzer] Add experimental ObjC invalidation method checker.Anna Zaks2012-09-261-0/+107
This checker is annotation driven. It checks that the annotated invalidation method accesses all ivars of the enclosing objects that are objects of type, which in turn contains an invalidation method. This is driven by __attribute((annotation("objc_instance_variable_invalidator")). llvm-svn: 164716
OpenPOWER on IntegriCloud