summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Analysis/SymbolManager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Analysis/SymbolManager.cpp b/clang/lib/Analysis/SymbolManager.cpp
index 54ba7b1d937..1672af8c611 100644
--- a/clang/lib/Analysis/SymbolManager.cpp
+++ b/clang/lib/Analysis/SymbolManager.cpp
@@ -92,6 +92,11 @@ bool SymbolReaper::maybeDead(SymbolRef sym) {
}
bool SymbolReaper::isLive(SymbolRef sym) {
- return TheLiving.contains(sym);
+ if (TheLiving.contains(sym))
+ return true;
+
+ // Interogate the symbol. It may derive from an input value to
+ // the analyzed function/method.
+ return isa<SymbolRegionRValue>(SymMgr.getSymbolData(sym));
}
OpenPOWER on IntegriCloud