llvm-capstone/clang/lib/StaticAnalyzer/Core
ziqingluo-90 a5e354ec4d [analyzer] Fixing a bug raising false positives of stack block object
leaking in ARC mode

When ARC (automatic reference count) is enabled, (objective-c) block
objects are automatically retained and released thus they do not leak.
Without ARC, they still can leak from an expiring stack frame like
other stack variables.
With this commit, the static analyzer now puts a block object in an
"unknown" region if ARC is enabled because it is up to the
implementation to choose whether to put the object on stack initially
(then move to heap when needed) or in heap directly under ARC.
Therefore, the `StackAddrEscapeChecker` has no need to know
specifically about ARC at all and it will not report errors on objects
in "unknown" regions.

Reviewed By: NoQ (Artem Dergachev)

Differential Revision: https://reviews.llvm.org/D131009
2022-08-26 12:19:32 -07:00
..
AnalysisManager.cpp
AnalyzerOptions.cpp [clang] Use value instead of getValue (NFC) 2022-07-13 23:39:33 -07:00
APSIntType.cpp
BasicValueFactory.cpp [analyzer] Fix static_cast on pointer-to-member handling 2021-02-15 11:44:37 +03:00
BlockCounter.cpp
BugReporter.cpp [clang, clang-tools-extra] Use has_value instead of hasValue (NFC) 2022-07-12 22:47:41 -07:00
BugReporterVisitors.cpp Remove redundaunt virtual specifiers (NFC) 2022-07-25 23:00:59 -07:00
CallDescription.cpp [clang] Don't use Optional::getValue (NFC) 2022-06-20 22:59:26 -07:00
CallEvent.cpp [clang] Don't use Optional::getValue (NFC) 2022-06-20 22:59:26 -07:00
Checker.cpp
CheckerContext.cpp [analyzer][NFC] Prefer using isa<> instead getAs<> in conditions 2022-06-15 16:58:13 +02:00
CheckerHelpers.cpp [analyzer] Model comparision methods of std::unique_ptr 2021-07-16 09:54:05 +05:30
CheckerManager.cpp [analyzer] Dump checker name if multiple checkers evaluate the same call 2021-11-02 14:42:14 +01:00
CheckerRegistryData.cpp
CMakeLists.txt [analyzer][NFC] Separate CallDescription from CallEvent 2021-11-15 19:10:46 +01:00
CommonBugCategories.cpp [analyzer] Introduce common bug category "Unused code". 2021-03-17 20:58:27 -07:00
ConstraintManager.cpp [analyzer][NFC] Add LLVM_UNLIKELY to assumeDualImpl 2022-06-07 12:48:48 +02:00
CoreEngine.cpp [clang][analyzer][ctu] Make CTU a two phase analysis 2022-05-18 10:35:52 +02:00
DynamicExtent.cpp [analyzer] DynamicSize: Rename 'size' to 'extent' 2021-04-05 19:20:43 +02:00
DynamicType.cpp [clang] Add a raw_ostream operator<< overload for QualType 2022-04-20 22:09:05 +01:00
Environment.cpp [clang] Don't use Optional::getValue (NFC) 2022-06-20 22:59:26 -07:00
ExplodedGraph.cpp [analyzer][NFC] Refactor llvm::isa<> usages in the StaticAnalyzer 2021-10-20 17:43:31 +02:00
ExprEngine.cpp [analyzer] Process non-POD array element destructors 2022-08-24 01:28:21 +02:00
ExprEngineC.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
ExprEngineCallAndReturn.cpp [analyzer] Process non-POD array element destructors 2022-08-24 01:28:21 +02:00
ExprEngineCXX.cpp [analyzer] Fix for incorrect handling of 0 length non-POD array construction 2022-08-25 12:42:02 +02:00
ExprEngineObjC.cpp
FunctionSummary.cpp
HTMLDiagnostics.cpp [clang] Use llvm::reverse (NFC) 2021-12-17 16:51:42 -08:00
LoopUnrolling.cpp [Clang][C++20] Support capturing structured bindings in lambdas 2022-08-04 10:12:53 +02:00
LoopWidening.cpp [analyzer][NFC] Refactor llvm::isa<> usages in the StaticAnalyzer 2021-10-20 17:43:31 +02:00
MemRegion.cpp [analyzer] Fixing a bug raising false positives of stack block object 2022-08-26 12:19:32 -07:00
PlistDiagnostics.cpp [clang] Use value instead of getValue (NFC) 2022-07-13 23:39:33 -07:00
PrettyStackTraceLocationContext.h
ProgramState.cpp [analyzer] Process non-POD array element destructors 2022-08-24 01:28:21 +02:00
RangeConstraintManager.cpp [clang][clang-tools-extra] LLVM_NODISCARD => [[nodiscard]]. NFC 2022-08-09 07:11:18 +00:00
RangedConstraintManager.cpp [analyzer] Fix crash in RangedConstraintManager.cpp 2022-03-23 08:26:40 -05:00
RegionStore.cpp [analyzer] Fix for incorrect handling of 0 length non-POD array construction 2022-08-25 12:42:02 +02:00
SarifDiagnostics.cpp [clang] Convert for_each to range-based for loops (NFC) 2022-06-10 22:39:45 -07:00
SimpleConstraintManager.cpp [analyzer] Remove NotifyAssumeClients 2022-06-07 13:02:03 +02:00
SimpleSValBuilder.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
SMTConstraintManager.cpp [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
Store.cpp [analyzer][NFC] Prefer using isa<> instead getAs<> in conditions 2022-06-15 16:58:13 +02:00
SValBuilder.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
SVals.cpp [analyzer] Add new function clang_analyzer_value to ExprInspectionChecker 2022-07-15 20:07:04 +03:00
SymbolManager.cpp [analyzer] Add UnarySymExpr 2022-05-26 14:00:27 +02:00
TextDiagnostics.cpp Fix a typo (occured => occurred) 2022-02-08 21:35:26 +01:00
WorkList.cpp Use llvm::less_second (NFC) 2022-06-04 22:48:32 -07:00