summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2018-10-11 22:59:38 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2018-10-11 22:59:38 +0000
commitca7a23e761bbdde867ada667c4d59f563ef07865 (patch)
treef695371c86322fb948b575cdbb0b3a15e09323b3 /clang/lib
parent41dc8de6ae9f5ac1d39e5b8a86c2990a5c1feb9c (diff)
downloadbcm5719-llvm-ca7a23e761bbdde867ada667c4d59f563ef07865.tar.gz
bcm5719-llvm-ca7a23e761bbdde867ada667c4d59f563ef07865.zip
[analyzer] Avoid unneeded invalidation in RetainCountChecker
Differential Revision: https://reviews.llvm.org/D53168 llvm-svn: 344312
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
index ca58f14985c..1608bade7e9 100644
--- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
@@ -802,25 +802,6 @@ bool RetainCountChecker::evalCall(const CallExpr *CE, CheckerContext &C) const {
}
state = state->BindExpr(CE, LCtx, RetVal, false);
- // FIXME: This should not be necessary, but otherwise the argument seems to be
- // considered alive during the next statement.
- if (const MemRegion *ArgRegion = RetVal.getAsRegion()) {
- // Save the refcount status of the argument.
- SymbolRef Sym = RetVal.getAsLocSymbol();
- const RefVal *Binding = nullptr;
- if (Sym)
- Binding = getRefBinding(state, Sym);
-
- // Invalidate the argument region.
- state = state->invalidateRegions(
- ArgRegion, CE, C.blockCount(), LCtx,
- /*CausesPointerEscape*/ hasTrustedImplementationAnnotation);
-
- // Restore the refcount status of the argument.
- if (Binding)
- state = setRefBinding(state, Sym, *Binding);
- }
-
C.addTransition(state);
return true;
}
OpenPOWER on IntegriCloud