summaryrefslogtreecommitdiffstats
path: root/include/clang/Analysis/PathSensitive/ValueManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Analysis/PathSensitive/ValueManager.h')
-rw-r--r--include/clang/Analysis/PathSensitive/ValueManager.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/clang/Analysis/PathSensitive/ValueManager.h b/include/clang/Analysis/PathSensitive/ValueManager.h
index de318a0..36d1df2 100644
--- a/include/clang/Analysis/PathSensitive/ValueManager.h
+++ b/include/clang/Analysis/PathSensitive/ValueManager.h
@@ -67,12 +67,17 @@ public:
const void* SymbolTag = 0) {
return SymMgr.getConjuredSymbol(E, VisitCount, SymbolTag);
}
-
+
/// makeZeroVal - Construct an SVal representing '0' for the specified type.
SVal makeZeroVal(QualType T);
- /// GetRegionValueSymbolVal - make a unique symbol for value of R.
- SVal getRegionValueSymbolVal(const MemRegion* R, QualType T = QualType());
+ /// getRegionValueSymbolVal - make a unique symbol for value of R.
+ SVal getRegionValueSymbolVal(const MemRegion *R, QualType T = QualType());
+
+ SVal getRegionValueSymbolValOrUnknown(const MemRegion *R, QualType T) {
+ return SymMgr.canSymbolicate(T) ? getRegionValueSymbolVal(R, T)
+ : UnknownVal();
+ }
SVal getConjuredSymbolVal(const Expr *E, unsigned Count);
SVal getConjuredSymbolVal(const Expr* E, QualType T, unsigned Count);
OpenPOWER on IntegriCloud