summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/RetainSummaryManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Fix more analyzer warnings on analyzer and libAnalysis.Artem Dergachev2019-08-281-1/+1
| | | | llvm-svn: 370263
* [analyzer] RetainCount: Add support for OSRequiredCast().Artem Dergachev2019-06-191-1/+8
| | | | | | | | | | | | | | It's a new API for custom RTTI in Apple IOKit/DriverKit framework that is similar to OSDynamicCast() that's already supported, but crashes instead of returning null (and therefore causing UB when the cast fails unexpectedly). Kind of like cast_or_null<> as opposed to dyn_cast_or_null<> in LLVM's RTTI. Historically, RetainCountChecker was responsible for modeling OSDynamicCast. This is simply an extension of the same functionality. Differential Revision: https://reviews.llvm.org/D63117 llvm-svn: 363891
* [analyzer] RetainCount: Add a suppression for "the Matching rule".Artem Dergachev2019-04-261-14/+21
| | | | | | | | | | | | | | | | In the OSObject universe there appears to be another slightly popular contract, apart from "create" and "get", which is "matching". It optionally consumes a "table" parameter and if a table is passed, it fills in the table and returns it at +0; otherwise, it creates a new table, fills it in and returns it at +1. For now suppress false positives by doing a conservative escape on all functions that end with "Matching", which is the naming convention that seems to be followed by all such methods. Differential Revision: https://reviews.llvm.org/D61161 llvm-svn: 359264
* [analyzer] RetainCount: A function isn't a CFRetain if it takes no arguments.Artem Dergachev2019-03-151-6/+7
| | | | | | | | | | | | | Don't crash when a function has a name that starts with "CF" and ends with "Retain" but takes 0 arguments. In particular, don't try to treat it as if it returns its first argument. These problems are inevitable because the checker is naming-convention-based, but at least we shouldn't crash. Differential Revision: https://reviews.llvm.org/D59123 llvm-svn: 356223
* [analyzer] [RetainCountChecker] Bugfix: in non-OSObject-mode, do not track ↵George Karpenkov2019-02-051-6/+6
| | | | | | | | CXX method calls Differential Revision: https://reviews.llvm.org/D57782 llvm-svn: 353227
* [analyzer] [RetainCountChecker] Bugfix for tracking top-level parameters of ↵George Karpenkov2019-01-301-2/+2
| | | | | | | | Objective-C methods Differential Revision: https://reviews.llvm.org/D57433 llvm-svn: 352588
* [analyzer] [RetainCountChecker] Track input parameters to the top-level functionGeorge Karpenkov2019-01-291-1/+44
| | | | | | | | | | Track them for ISL/OS objects by default, and for NS/CF under a flag. rdar://47536377 Differential Revision: https://reviews.llvm.org/D57356 llvm-svn: 352534
* [analyzer] [RetainSummaryManager] [NFC] Split one function into two, as it's ↵George Karpenkov2019-01-291-56/+42
| | | | | | | | really doing two things Differential Revision: https://reviews.llvm.org/D57201 llvm-svn: 352533
* [analyzer] [ARCMT] [NFC] Unify entry point into RetainSummaryManagerGeorge Karpenkov2019-01-291-31/+6
| | | | | | | | Just use one single entry point, since we have AnyCall utility now. Differential Revision: https://reviews.llvm.org/D57346 llvm-svn: 352532
* [analyzer] [RetainCountChecker] Support 'taggedRetain' and 'taggedRelease'George Karpenkov2019-01-291-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D57211 llvm-svn: 352530
* [analyzer] Port RetainSummaryManager to the new AnyCall interface, decouple ↵George Karpenkov2019-01-251-0/+1268
| | | | | | | | | | ARCMT from the analyzer rdar://19694750 Differential Revision: https://reviews.llvm.org/D57127 llvm-svn: 352149
* Revert "[analyzer] [NFC] Split up RetainSummaryManager from RetainCountChecker"Bruno Cardoso Lopes2018-08-181-902/+0
| | | | | | | | | | | | | | This reverts commit a786521fa66c72edd308baff0c08961b6d964fb1. Bots haven't caught up yet, but broke modules build with: ../tools/clang/include/clang/StaticAnalyzer/Checkers/MPIFunctionClassifier.h:18:10: fatal error: cyclic dependency in module 'Clang_StaticAnalyzer_Core': Clang_StaticAnalyzer_Core -> Clang_Analysis -> Clang_StaticAnalyzer_Checkers -> Clang_StaticAnalyzer_Core ^ llvm-svn: 340117
* [analyzer] [NFC] Split up RetainSummaryManager from RetainCountCheckerGeorge Karpenkov2018-08-181-0/+902
ARCMigrator is using code from RetainCountChecker, which is a layering violation (and it also does it badly, by using a different header, and then relying on implementation being present in a header file). This change splits up RetainSummaryManager into a separate library in lib/Analysis, which can be used independently of a checker. Differential Revision: https://reviews.llvm.org/D50934 llvm-svn: 340114
OpenPOWER on IntegriCloud