87d948ecccffea9e9e37d0d053b246e2d6d6c47b |
|
04-Mar-2016 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r256229 http://b/26987366 Change-Id: I5d349c9843ea5c24d6e455956f8a446393b6873d
/external/clang/test/Analysis/unix-fns.c
|
0e2c34f92f00628d48968dfea096d36381f494cb |
|
23-Mar-2015 |
Stephen Hines <srhines@google.com> |
Update aosp/master clang for rebase to r230699. Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/test/Analysis/unix-fns.c
|
57c8736e7dce5e63b4e1665d2c4fcf6e6ef959d0 |
|
07-Jun-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Address Jordan’s code review for r183451 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
6838710779a23ea5dfdb5764ad7b7a7451b00bf8 |
|
07-Jun-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Ensure that pieces with invalid locations always get removed from the BugReport The function in which we were doing it used to be conditionalized. Add a new unconditional cleanup step. This fixes PR16227 (radar://14073870) - a crash when generating html output for one of the test files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
fb6f75feaa0fa6621282df1075677a26fdfde1b7 |
|
06-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Look through ExprWithCleanups to see if an expr's consumed. We based decisions during analysis and during path generation on whether or not an expression is consumed, so if a top-level expression has cleanups it's important for us to look through that. <rdar://problem/14076125> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
048eeea6852043990c87e52938b53b5337bd098e |
|
04-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Enable the new edge algorithm by default. ...but don't yet migrate over the existing plist tests. Some of these would be trivial to migrate; others could use a bit of inspection first. In any case, though, the new edge algorithm seems to have proven itself, and we'd like more coverage (and more usage) of it going forwards. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
d474da062565596015558856333423199aed5eb1 |
|
24-May-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Treat analyzer-synthesized function bodies like implicit bodies. When generating path notes, implicit function bodies are shown at the call site, so that, say, copying a POD type in C++ doesn't jump you to a header file. This is especially important when the synthesized function itself calls another function (or block), in which case we should try to jump the user around as little as possible. By checking whether a called function has a body in the AST, we can tell if the analyzer synthesized the body, and if we should therefore collapse the call down to the call site like a true implicitly-defined function. <rdar://problem/13978414> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
0f8579274a010f360a371b53101859d9d6052314 |
|
24-Apr-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Refactor BugReport::getLocation and PathDiagnosticLocation::createEndOfPath for greater code reuse The 2 functions were computing the same location using different logic (each one had edge case bugs that the other one did not). Refactor them to rely on the same logic. The location of the warning reported in text/command line output format will now match that of the plist file. There is one change in the plist output as well. When reporting an error on a BinaryOperator, we use the location of the operator instead of the beginning of the BinaryOperator expression. This matches our output on command line and looks better in most cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
88530f880e7f3b1874f6bb98d7cfe84348ed0227 |
|
03-Apr-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Rename “Mac OS X API”, “Mac OS API” -> “API Misuse (Apple)” As they are relevant on both Mac and iOS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
4238f41d484729aca260140fbbc53a68769bf60a |
|
26-Feb-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Use 'MemRegion::printPretty()' instead of assuming the region is a VarRegion. Fixes PR15358 and <rdar://problem/13295437>. Along the way, shorten path diagnostics that say "Variable 'x'" to just be "'x'". By the context, it is obvious that we have a variable, and so this just consumes text space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
5846720f08a6b225484bfe663599c2b057a99bc8 |
|
05-Feb-2013 |
Ted Kremenek <kremenek@apple.com> |
Change subexpressions to be visited in the CFG from left-to-right. This is a more natural order of evaluation, and it is very important for visualization in the static analyzer. Within Xcode, the arrows will not jump from right to left, which looks very visually jarring. It also provides a more natural location for dataflow-based diagnostics. Along the way, we found a case in the analyzer diagnostics where we needed to indicate that a variable was "captured" by a block. -fsyntax-only timings on sqlite3.c show no visible performance change, although this is just one test case. Fixes <rdar://problem/13016513> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
bfa9ab8183e2fdc74f8633d758cb0c6201314320 |
|
25-Jan-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Replace "-analyzer-ipa" with "-analyzer-config ipa". The idea is to eventually place all analyzer options under "analyzer-config". In addition, this lays the ground for introduction of a high-level analyzer mode option, which will influence the default setting for IPAMode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
c1c6a4981a4b50476d71c88f8dac81a1430885ed |
|
08-Jan-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Plist: change the type of issue_hash from int to string. This gives more flexibility to what could be stored as issue_hash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
5d23eeaaad325c5310591b0b8ae69298fecd21a0 |
|
15-Nov-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Fix test case broken by previous commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
368f3b070e8cb657a65bfa443d60256676d269e7 |
|
15-Nov-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Make sure calls in synthesized functions have valid path locations. We do this by using the "most recent" good location: if a synthesized function 'A' calls another function 'B', the path notes for the call to 'B' will be placed at the same location as the path note for calling 'A'. Similarly, the call to 'A' will have a note saying "Entered call from...", and now we just don't emit that (since the user doesn't have a body to look at anyway). Previously, we were doing this for the "Calling..." notes, but not for the "Entered call from..." or "Returning to caller". This caused a crash when the path entered and then exiting a call within a synthesized body. <rdar://problem/12657843> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
eafaad279f7be4552e5a2246fcda1b5d65698104 |
|
30-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Warn about reallocf with an allocation size of 0, like realloc. Patch by Sean McBride! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
cc85d217d329aa3c78aa3f57a238e5b7931ee2c5 |
|
21-Sep-2012 |
Ted Kremenek <kremenek@apple.com> |
Add faux-body support for dispatch_once(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
a43df9539644bf1c258e12710cd69d79b0b078cd |
|
21-Sep-2012 |
Ted Kremenek <kremenek@apple.com> |
Implement faux-body-synthesis of well-known functions in the static analyzer when their implementations are unavailable. Start by simulating dispatch_sync(). This change is largely a bunch of plumbing around something very simple. We use AnalysisDeclContext to conjure up a fake function body (using the current ASTContext) when one does not exist. This is controlled under the analyzer-config option "faux-bodies", which is off by default. The plumbing in this patch is largely to pass the necessary machinery around. CallEvent needs the AnalysisDeclContextManager to get the function definition, as one may get conjured up lazily. BugReporter and PathDiagnosticLocation needed to be relaxed to handle invalid locations, as the conjured body has no real source locations. We do some primitive recovery in diagnostic generation to generate some reasonable locations (for arrows and events), but it can be improved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
be879727893994532b4a643bfae6fb656742057f |
|
13-Sep-2012 |
Ted Kremenek <kremenek@apple.com> |
When warning about unsafe uses of dispatch_once, specially handle the crazy case where dispatch_once gets redefined as a macro that calls _dispatch_once (which calls the real dispatch_once). Users want to see the warning in their own code. Fixes <rdar://problem/11617767> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
3e97758f22f31d0dbc336fc4794b86aed8607053 |
|
11-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
"This change adds alloca/valloc checks to UnixAPIChecker. It includes a small refactoring for the common *alloc functions as well as a few tiny wibbles (adds a note to CWE/CERT advisory numbers in the bug output, and fixes a couple 80-column-wide violations.)" Patch by Austin Seipp! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
c1275da4eb5778eb3c9600e79918ad1fbec589c6 |
|
04-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
Enhance UnixAPIChecker to also warn about zero-sized allocations to calloc() and realloc(). Patch by Cyril Roelandt! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
a4c7a4314ffbe402091695874e93d9b0a79c8099 |
|
29-Jul-2011 |
Ted Kremenek <kremenek@apple.com> |
Really remove FlatStoreManager and BasicStoreManager, this time from the driver. Also remove associated tests. Sorry for the messy commits; this is the result of a botched Git merge. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
5188507b9a1b09ec95c14ffadf0e832f2b47aa8a |
|
24-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Rework checker "packages" and groups to be more hierarchical. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
c4d2c9074be6eb2091086eddd6c8f052f3b245c8 |
|
28-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
38c8fe705ec4a8efa8992b99ab6d264fff14ca36 |
|
24-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow passing a list of comma separated checker names to -analyzer-checker, e.g: -analyzer-checker=cocoa,unix git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
027a6abdd6cedc0b8203da72eed6d15c796dce9d |
|
15-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[analyzer] Use the new registration mechanism on some of the internal checks. These are: StackAddrLeakChecker ObjCAtSyncChecker UnixAPIChecker MacOSXAPIChecker The rest have/create implicit dependencies between checkers and need to be handled differently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
b12fbc216f77bd309f8c416834b341ff43325aab |
|
16-Nov-2010 |
Ted Kremenek <kremenek@apple.com> |
Static analyzer: Catch calls to malloc() with allocation sizes of 0 bytes. Fixes PR 2899. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
99d9838b256ded8e59f85c93647ba5ec060b7145 |
|
08-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Add static analyzer check for calls to 'pthread_once()' where the control-flow has automatic storage. This matches the corresponding check for 'dispatch_once()'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
fc89323210a5f3f53808f7d801705d6b8c0a4224 |
|
25-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove test case dependancy on platform headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|
381d1bf0eeabccac1ba64909cad73d2ee963897b |
|
25-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Add UnixAPIChecker, a meta checker to include various precondition checks for calls to various unix/posix functions, e.g. 'open()'. As a first check, check that when 'open()' is passed 'O_CREAT' that it has a third argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/unix-fns.c
|