summaryrefslogtreecommitdiff
path: root/clang/test/Analysis/return-ptr-range.cpp
AgeCommit message (Collapse)Author
2023-01-26Fix assertion failure "PathDiagnosticSpotPiece's must have a valid ↵Arseniy Zaostrovnykh
location." in ReturnPtrRange checker on builtin functions Builtin functions (such as `std::move`, `std::forward`, `std::as_const`) have a body generated during the analysis not related to any source file so their statements have no valid source locations. `ReturnPtrRange` checker should not report issues for these builtin functions because they only forward its parameter and do not create any new pointers. Fixes #55347 Patch by Arseniy Zaostrovnykh. Reviewed By: NoQ Differential Revision: https://reviews.llvm.org/D138713
2021-08-11[clang][analyzer] Improve bug report in alpha.security.ReturnPtrRangeBalázs Kéri
Add some notes and track of bad return value. Reviewed By: steakhal Differential Revision: https://reviews.llvm.org/D107051
2020-11-02[analyzer][ReturnPtrRangeChecker] Fix a false positive on end() iteratorKirstóf Umann
ReturnPtrRange checker emits a report if a function returns a pointer which points out of the buffer. However, end() iterator of containers is always such a pointer, so this always results a false positive report. This false positive case is now eliminated. This patch resolves these tickets: https://bugs.llvm.org/show_bug.cgi?id=20929 https://bugs.llvm.org/show_bug.cgi?id=25226 https://bugs.llvm.org/show_bug.cgi?id=27701 Patch by Tibor Brunner! Differential Revision: https://reviews.llvm.org/D83678
2017-03-03Reland 4: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen
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
2017-03-02Revert "Reland 3: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen
multiple constraint managers" This reverts commit ea36f1406e1f36bf456c3f3929839b024128e468. llvm-svn: 296841
2017-03-02Reland 3: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen
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
2017-03-02Revert "Reland 2: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen
multiple constraint managers" This reverts commit f93343c099fff646a2314cc7f4925833708298b1. llvm-svn: 296836
2017-03-02Reland 2: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen
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
2017-02-28Revert "Reland: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen
multiple constraint managers" This reverts commit 1b28d0b10e1c8feccb971abb6ef7a18bee589830. llvm-svn: 296422
2017-02-28Reland: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen
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
2017-02-27Revert "[analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen
constraint managers" This reverts commit 8e7780b9e59ddaad1800baf533058d2c064d4787. llvm-svn: 296317
2017-02-27[analyzer] NFC: Update test infrastructure to support multiple constraint ↵Dominic Chen
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
2015-12-10[analyzer] Fix symbolic element index lifetime.Artem Dergachev
SymbolReaper was destroying the symbol too early when it was referenced only from an index SVal of a live ElementRegion. In order to test certain aspects of this patch, extend the debug.ExprInspection checker to allow testing SymbolReaper in a direct manner. Differential Revision: http://reviews.llvm.org/D12726 llvm-svn: 255236