George Karpenkov
79f0340c53
[analyzer] Correct the summary violation diagnostics for the retain count checker
...
It should be in the past tense.
llvm-svn: 349938
2018-12-21 19:13:28 +00:00
George Karpenkov
f508532627
[analyzer] Fix a bug in RetainCountDiagnostics while printing a note on mismatched summary in inlined functions
...
Previously, we were not printing a note at all if at least one of the parameters was not annotated.
rdar://46888422
Differential Revision: https://reviews.llvm.org/D55972
llvm-svn: 349875
2018-12-21 02:16:23 +00:00
George Karpenkov
ff01486753
[analyzer] Display a diagnostics when an inlined function violates its os_consumed summary
...
This is currently a diagnostics, but might be upgraded to an error in the future,
especially if we introduce os_return_on_success attributes.
rdar://46359592
Differential Revision: https://reviews.llvm.org/D55530
llvm-svn: 348820
2018-12-11 01:13:40 +00:00
George Karpenkov
79ed11c12e
[analyzer] Resolve another bug where the name of the leaked object was not printed properly
...
Differential Revision: https://reviews.llvm.org/D55528
llvm-svn: 348819
2018-12-11 01:13:20 +00:00
Raphael Isemann
b23ccecbb0
Misc typos fixes in ./lib folder
...
Summary: Found via `codespell -q 3 -I ../clang-whitelist.txt -L uint,importd,crasher,gonna,cant,ue,ons,orign,ned`
Reviewers: teemperor
Reviewed By: teemperor
Subscribers: teemperor, jholewinski, jvesely, nhaehnle, whisperity, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D55475
llvm-svn: 348755
2018-12-10 12:37:46 +00:00
George Karpenkov
936a9c978c
[analyzer] RetainCountChecker: remove untested, unused, incorrect option IncludeAllocationLine
...
The option has no tests, is not used anywhere, and is actually
incorrect: it prints the line number without the reference to a file,
which can be outright incorrect.
Differential Revision: https://reviews.llvm.org/D55385
llvm-svn: 348637
2018-12-07 20:21:37 +00:00
Mikael Holmen
ebf787b138
Fix warning about unused variable [NFC]
...
llvm-svn: 347987
2018-11-30 13:38:33 +00:00
Haojian Wu
ceff730fef
Fix a use-after-scope bug.
...
llvm-svn: 347970
2018-11-30 09:23:01 +00:00
George Karpenkov
2bd644ebbd
[analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"
...
Differential Revision: https://reviews.llvm.org/D55076
llvm-svn: 347949
2018-11-30 02:19:03 +00:00
George Karpenkov
b43772d85c
[analyzer] Switch retain count checker for OSObject to use OS_* attributes
...
Instead of generalized reference counting annotations.
Differential Revision: https://reviews.llvm.org/D55041
llvm-svn: 347948
2018-11-30 02:18:50 +00:00
George Karpenkov
62db886062
[analyzer] [NFC] Minor refactoring of RetainCountDiagnostics
...
Move visitors to the implementation file, move a complicated logic into
a function.
Differential Revision: https://reviews.llvm.org/D55036
llvm-svn: 347946
2018-11-30 02:18:23 +00:00
George Karpenkov
e2f09542a5
[analyzer] Print a fully qualified name for functions in RetainCountChecker diagnostics
...
Attempt to get a fully qualified name from AST if an SVal corresponding
to the object is not available.
Differential Revision: https://reviews.llvm.org/D55034
llvm-svn: 347944
2018-11-30 02:17:57 +00:00
George Karpenkov
f893ea1592
[analyzer] Add the type of the leaked object to the diagnostic message
...
If the object is a temporary, and there is no variable it binds to,
let's at least print out the object name in order to help differentiate
it from other temporaries.
rdar://45175098
Differential Revision: https://reviews.llvm.org/D55033
llvm-svn: 347943
2018-11-30 02:17:44 +00:00
George Karpenkov
a1c3bb88ee
[analyzer] Reference leaked object by name, even if it was created in an inlined function.
...
rdar://45532181
Differential Revision: https://reviews.llvm.org/D54973
llvm-svn: 347942
2018-11-30 02:17:31 +00:00
George Karpenkov
b3303d7c1d
[analyzer] [NFC] Some miscellaneous clean ups and documentation fixes.
...
Differential Revision: https://reviews.llvm.org/D54971
llvm-svn: 347940
2018-11-30 02:17:05 +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
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
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