Sam McCall
5da4d75877
Remove top-level using declaration from header files, as these aliases leak.
...
Reviewers: ilya-biryukov
Subscribers: arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D53135
llvm-svn: 344337
2018-10-12 12:21:29 +00:00
George Karpenkov
ca7a23e761
[analyzer] Avoid unneeded invalidation in RetainCountChecker
...
Differential Revision: https://reviews.llvm.org/D53168
llvm-svn: 344312
2018-10-11 22:59:38 +00:00
George Karpenkov
41dc8de6ae
[analyzer] Retain count checker for OSObject: recognize OSDynamicCast
...
For now, tresting the cast as a no-op, and disregarding the case where
the output becomes null due to the type mismatch.
rdar://45174557
Differential Revision: https://reviews.llvm.org/D53156
llvm-svn: 344311
2018-10-11 22:59:16 +00:00
George Karpenkov
c82d457db5
[analyzer] [NFC] Remove unused parameters, as found by -Wunused-parameter
...
Differential Revision: https://reviews.llvm.org/D52640
llvm-svn: 343353
2018-09-28 18:49:41 +00:00
George Karpenkov
04553e530f
[analyzer] Process state in checkEndFunction in RetainCountChecker
...
Modify the RetainCountChecker to perform state "adjustments" in
checkEndFunction, as performing work in PreStmt<ReturnStmt> does not
work with destructors.
The previous version made an implicit assumption that no code runs
after the return statement is executed.
rdar://43945028
Differential Revision: https://reviews.llvm.org/D52338
llvm-svn: 342770
2018-09-21 20:37:20 +00:00
George Karpenkov
6babf2ae16
[analyzer] [NFC] Prefer make_unique over "new"
...
Differential Revision: https://reviews.llvm.org/D52336
llvm-svn: 342767
2018-09-21 20:36:21 +00:00
George Karpenkov
d5ef0d2a4b
[analyzer] Better retain count rules for OSObjects
...
Differential Revision: https://reviews.llvm.org/D51184
llvm-svn: 340961
2018-08-29 20:28:33 +00:00
George Karpenkov
ab0011ebc0
[analyzer] Preliminary version of retain count checking for OSObjects
...
Has quite a lot of false positives, disabled behind the flag.
Differential Revision: https://reviews.llvm.org/D50880
llvm-svn: 340502
2018-08-23 00:26:59 +00:00
George Karpenkov
6e9fd1377d
[analyzer] [NFC] Fix minor formatting issues in RetainCountChecker
...
Differential Revision: https://reviews.llvm.org/D51072
llvm-svn: 340378
2018-08-22 01:17:09 +00:00
George Karpenkov
80c9e78e3b
[analyzer] [NFC] Extract a method for creating RefVal from RetEffect in RetainCountChecker
...
Differential Revision: https://reviews.llvm.org/D51071
llvm-svn: 340377
2018-08-22 01:16:49 +00:00
George Karpenkov
efef49cd2f
[analyzer] [NFC] Split up RetainSummaryManager from RetainCountChecker - try #2
...
Turns out it can't be removed from the analyzer since it relies on CallEvent.
Moving to staticAnalyzer/core
Differential Revision: https://reviews.llvm.org/D51023
llvm-svn: 340247
2018-08-21 03:09:02 +00:00
Bruno Cardoso Lopes
bb3b7cff96
Revert "[analyzer] [NFC] Split up RetainSummaryManager from RetainCountChecker"
...
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
2018-08-18 03:22:11 +00:00
George Karpenkov
0ac54fad53
[analyzer] [NFC] Split up RetainSummaryManager from RetainCountChecker
...
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
2018-08-18 01:45:50 +00:00
George Karpenkov
b1b791b9b1
[analyzer] [NFC] Minor refactoring of ISL-specific code in RetainCountChecker
...
Differential Revision: https://reviews.llvm.org/D50879
llvm-svn: 340098
2018-08-17 21:43:27 +00:00
George Karpenkov
bc0cddf0c8
[analyzer] Re-instate support for MakeCollectable is RetainCountChecker
...
Differential Revision: https://reviews.llvm.org/D50872
llvm-svn: 340097
2018-08-17 21:42:59 +00:00
George Karpenkov
03011b2d98
[analyzer] [NFC] Move ObjCRetainCount to include/Analysis
...
Differential Revision: https://reviews.llvm.org/D50869
llvm-svn: 340096
2018-08-17 21:42:32 +00:00
George Karpenkov
c4d6b93dc7
[analyzer] [NFC] Move canEval function from RetainCountChecker to RetainCountSummaries
...
Differential Revision: https://reviews.llvm.org/D50863
llvm-svn: 340094
2018-08-17 21:42:05 +00:00
George Karpenkov
cab604e9c7
[analyzer] [NFC] Split up summary generation in RetainCountChecker in two methods
...
Differential Revision: https://reviews.llvm.org/D50830
llvm-svn: 340093
2018-08-17 21:41:37 +00:00
George Karpenkov
70c2ee30bc
[analyzer] [NFC] Split up RetainCountChecker
...
At some point, staring at 4k+ LOC file becomes a bit hard.
Differential Revision: https://reviews.llvm.org/D50821
llvm-svn: 340092
2018-08-17 21:41:07 +00:00