summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/malloc-interprocedural.c
Commit message (Collapse)AuthorAgeFilesLines
* Reland 4: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-031-1/+1
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296895
* Revert "Reland 3: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-03-021-1/+1
| | | | | | | | multiple constraint managers" This reverts commit ea36f1406e1f36bf456c3f3929839b024128e468. llvm-svn: 296841
* Reland 3: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-021-1/+1
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296837
* Revert "Reland 2: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-03-021-1/+1
| | | | | | | | multiple constraint managers" This reverts commit f93343c099fff646a2314cc7f4925833708298b1. llvm-svn: 296836
* Reland 2: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-021-1/+1
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296835
* Revert "Reland: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-02-281-1/+1
| | | | | | | | multiple constraint managers" This reverts commit 1b28d0b10e1c8feccb971abb6ef7a18bee589830. llvm-svn: 296422
* Reland: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-02-281-1/+1
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296414
* Revert "[analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-02-271-1/+1
| | | | | | | | constraint managers" This reverts commit 8e7780b9e59ddaad1800baf533058d2c064d4787. llvm-svn: 296317
* [analyzer] NFC: Update test infrastructure to support multiple constraint ↵Dominic Chen2017-02-271-1/+1
| | | | | | | | | | | | | | managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296312
* [analyzer] Shorten the malloc checker’s leak messageAnna Zaks2013-04-061-4/+4
| | | | | | As per Ted’s suggestion! llvm-svn: 178938
* [analyzer] Report leaks at the closing brace of a function body.Jordan Rose2012-11-151-8/+12
| | | | | | | | | | | | | | | | | | | | This fixes a few cases where we'd emit path notes like this: +---+ 1| v p = malloc(len); ^ |2 +---+ In general this should make path notes more consistent and more correct, especially in cases where the leak happens on the false branch of an if that jumps directly to the end of the function. There are a couple places where the leak is reported farther away from the cause; these are usually cases where there are several levels of nested braces before the end of the function. This still matches our current behavior for when there /is/ a statement after all the braces, though. llvm-svn: 168070
* clang/test/Analysis: Fix the declaration of strlen() for 32 bit targets.NAKAMURA Takumi2012-09-201-3/+0
| | | | | | | | | | - Inputs/system-header-simulator.h: Declare strlen() with size_t. - malloc-interprocedural.c: Move the definition of size_t into the header above. Then XFAIL can be pruned. llvm-svn: 164300
* test/Analysis/malloc-interprocedural.c: Mark it as XFAIL: cygwin,mingw,msvc ↵NAKAMURA Takumi2012-09-201-0/+2
| | | | | | for now. Investigating. llvm-svn: 164295
* [analyzer] MallocChecker should not do post-call checks on inlined functions.Jordan Rose2012-09-201-2/+36
| | | | | | | | | | | If someone provides their own function called 'strdup', or 'reallocf', or even 'malloc', and we inlined it, the inlining should have given us all the malloc-related information we need. If we then try to attach new information to the return value, we could end up with spurious warnings. <rdar://problem/12317671> llvm-svn: 164276
* Adjust some analyzer tests to place widely shared inputs inside of anChandler Carruth2012-09-121-1/+1
| | | | | | | | | | | | | | | '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
* [analyzer] -analyzer-ipa=inlining is now the default. Remove it from tests.Jordan Rose2012-08-211-1/+1
| | | | | | | | | | | | | The actual change here is a little more complicated than the summary above. What we want to do is have our generic inlining tests run under whatever mode is the default. However, there are some tests that depend on the presence of C++ inlining, which still has some rough edges. These tests have been explicitly marked as -analyzer-ipa=inlining in preparation for a new mode that limits inlining to C functions and blocks. This will be the default until the false positives for C++ have been brought down to manageable levels. llvm-svn: 162317
* [analyzer] Malloc: Utter the name of the leaked variable.Anna Zaks2012-03-211-4/+4
| | | | | | | | | | | | | | | Specifically, we use the last store of the leaked symbol in the leak diagnostic. (No support for struct fields since the malloc checker doesn't track those yet.) + Infrastructure to track the regions used in store evaluations. This approach is more precise than iterating the store to obtain the region bound to the symbol, which is used in RetainCount checker. The region corresponds to what is uttered in the code in the last store and we do not rely on the store implementation to support this functionality. llvm-svn: 153212
* [analyzer] Rework inlining related command line options.Anna Zaks2012-03-081-1/+1
| | | | | | | | | - Remove -analyzer-inline-call. - Add -analyzer-ipa=[none|inlining] - Add -analyzer-inlining-mode to allow experimentation for different performance tuning methods. llvm-svn: 152351
* [analyzer] Bound the size of the functions being inlined + provideAnna Zaks2012-03-021-1/+1
| | | | | | | | | | | command line options for inlining tuning. This adds the option for stack depth bound as well as function size bound. + minor doxygenification llvm-svn: 151930
* [analyzer] Leaks should be uniqued by the allocation point in theAnna Zaks2012-02-271-3/+4
| | | | | | | | | closest function context. This prevents us from uniqueing all leaks from the same allocation helper. radar://10932226 llvm-svn: 151592
* [analyzer] Run remove dead bindings before each call.Anna Zaks2012-02-241-0/+10
| | | | | | | This ensures that we report the bugs associated with symbols going out of scope in the correct function context. llvm-svn: 151369
* [analyzer] We were silently stopping exploring the path afterAnna Zaks2012-02-241-0/+16
| | | | | | | | | visiting 'return;' statement! This most likely caused us to skip a bunch of code when analyzing with inlining. llvm-svn: 151368
* [analyzer] + a couple more malloc tests.Anna Zaks2012-02-211-0/+17
| | | | llvm-svn: 151008
* [analyzer] Make Malloc aware of inter-procedural execution + basicAnna Zaks2012-02-201-0/+54
tests. llvm-svn: 150993
OpenPOWER on IntegriCloud