summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index a9a7aaa1179..27812f5a74d 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/lib/Analysis/CFRefCount.cpp
@@ -693,9 +693,13 @@ void CFRefCount::EvalCall(ExplodedNodeSet<ValueState>& Dst,
break;
}
}
- }
- else if (isa<LVal>(V)) // Nuke all arguments passed by reference.
+ }
+ else if (isa<LVal>(V)) { // Nuke all arguments passed by reference.
+
+ // FIXME: This is basically copy-and-paste from GRSimpleVals. We
+ // should compose behavior, not copy it.
StateMgr.Unbind(StVals, cast<LVal>(V));
+ }
}
if (hasError) {
@@ -733,6 +737,8 @@ void CFRefCount::EvalCall(ExplodedNodeSet<ValueState>& Dst,
case RetEffect::NoRet:
// Make up a symbol for the return value (not reference counted).
+ // FIXME: This is basically copy-and-paste from GRSimpleVals. We
+ // should compose behavior, not copy it.
if (CE->getType() != Eng.getContext().VoidTy) {
unsigned Count = Builder.getCurrentBlockCount();
OpenPOWER on IntegriCloud