summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/Inputs/system-header-simulator-objc.h
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Teach MismatchedDealloc about initWithBytesNoCopy with deallocator.Artem Dergachev2019-12-181-1/+4
| | | | | | | | MallocChecker warns when memory is passed into -[NSData initWithBytesNoCopy] but isn't allocated by malloc(), because it will be deallocated by free(). However, initWithBytesNoCopy has an overload that takes an arbitrary block for deallocating the object. If such overload is used, it is no longer necessary to make sure that the memory is allocated by malloc().
* [analyzer] Refer to macro names in diagnostics for macros representing a literalAnna Zaks2016-12-151-1/+6
| | | | | | | | | | | | | When a macro expending to a literal is used in a comparison, use the macro name in the diagnostic rather than the literal. This improves readability of path notes. Added tests for various macro literals that could occur. Only BOOl, Int, and NULL tests have changed behavior with this patch. Differential Revision: https://reviews.llvm.org/D27726 llvm-svn: 289884
* [analyzer] Add NumberObjectConversion checker.Artem Dergachev2016-10-181-0/+7
| | | | | | | | | | | | | | | | | When dealing with objects that represent numbers, such as Objective-C NSNumber, the language provides little protection from accidentally interpreting the value of a pointer to such object as the value of the number represented by the object. Results of such mis-interpretation may be unexpected. The checker attempts to fill this gap in cases when the code is obviously incorrect. With "Pedantic" option enabled, this checker enforces a coding style to completely prevent errors of this kind (off by default). Differential Revision: https://reviews.llvm.org/D22968 llvm-svn: 284473
* [analyzer] Pointers escape into +[NSValue valueWithPointer:]...Jordan Rose2014-01-071-2/+5
| | | | | | | | | | ...even though the argument is declared "const void *", because this is just a way to pass pointers around as objects. (Though NSData is often a better one.) PR18262 llvm-svn: 198710
* [analyzer] Malloc checker should only escape the receiver when “[O ↵Anna Zaks2013-05-311-0/+1
| | | | | | | | | init..]” is called. Jordan has pointed out that it is valuable to warn in cases when the arguments to init escape. For example, NSData initWithBytes id not going to free the memory. llvm-svn: 183062
* [analyzer] Explain why we have system-header-simulator*.h files.Jordan Rose2013-02-011-0/+5
| | | | | | Suggested by Csaba. Text based on an e-mail of mine on cfe-dev. llvm-svn: 174213
* Adjust some analyzer tests to place widely shared inputs inside of anChandler Carruth2012-09-121-0/+130
'Inputs' subdirectory. The general desire has been to have essentially all of the non-test input files live in such directories, with some exceptions for obvious and common patterns like 'foo.c' using 'foo.h'. This came up because our distributed test runner couldn't find some of the headers, for example with stl.cpp. No functionality changed, just shuffling around here. llvm-svn: 163674
OpenPOWER on IntegriCloud