summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/BasicStore.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-05-02 19:42:42 +0000
committerTed Kremenek <kremenek@apple.com>2011-05-02 19:42:42 +0000
commitaa181174e719405cda6b8b387ced59b856cd7b6e (patch)
treed15ac9d8f2c0e5810f32a4514d4228924aeb2699 /clang/lib/StaticAnalyzer/Core/BasicStore.cpp
parent24874a449c9f9fad2498165e25f9c4a640f55ab1 (diff)
downloadbcm5719-llvm-aa181174e719405cda6b8b387ced59b856cd7b6e.tar.gz
bcm5719-llvm-aa181174e719405cda6b8b387ced59b856cd7b6e.zip
Augment retain/release checker to not warn about tracked objects passed as arguments to C++ constructors. This is a stop-gap measure for Objective-C++ code that uses smart pointers to manage reference counts.
llvm-svn: 130711
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BasicStore.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/BasicStore.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BasicStore.cpp b/clang/lib/StaticAnalyzer/Core/BasicStore.cpp
index 4faa84ca266..7c9f45a474c 100644
--- a/clang/lib/StaticAnalyzer/Core/BasicStore.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BasicStore.cpp
@@ -49,11 +49,11 @@ public:
SVal Retrieve(Store store, Loc loc, QualType T = QualType());
StoreRef invalidateRegion(Store store, const MemRegion *R, const Expr *E,
- unsigned Count, InvalidatedSymbols *IS);
+ unsigned Count, InvalidatedSymbols &IS);
StoreRef invalidateRegions(Store store, const MemRegion * const *Begin,
const MemRegion * const *End, const Expr *E,
- unsigned Count, InvalidatedSymbols *IS,
+ unsigned Count, InvalidatedSymbols &IS,
bool invalidateGlobals,
InvalidatedRegions *Regions);
@@ -538,7 +538,7 @@ StoreRef BasicStoreManager::invalidateRegions(Store store,
const MemRegion * const *I,
const MemRegion * const *End,
const Expr *E, unsigned Count,
- InvalidatedSymbols *IS,
+ InvalidatedSymbols &IS,
bool invalidateGlobals,
InvalidatedRegions *Regions) {
StoreRef newStore(store, *this);
@@ -587,18 +587,16 @@ StoreRef BasicStoreManager::invalidateRegion(Store store,
const MemRegion *R,
const Expr *E,
unsigned Count,
- InvalidatedSymbols *IS) {
+ InvalidatedSymbols &IS) {
R = R->StripCasts();
if (!(isa<VarRegion>(R) || isa<ObjCIvarRegion>(R)))
return StoreRef(store, *this);
- if (IS) {
- BindingsTy B = GetBindings(store);
- if (BindingsTy::data_type *Val = B.lookup(R)) {
- if (SymbolRef Sym = Val->getAsSymbol())
- IS->insert(Sym);
- }
+ BindingsTy B = GetBindings(store);
+ if (BindingsTy::data_type *Val = B.lookup(R)) {
+ if (SymbolRef Sym = Val->getAsSymbol())
+ IS.insert(Sym);
}
QualType T = cast<TypedRegion>(R)->getValueType();
OpenPOWER on IntegriCloud