template<typename T>
T castAs() const {
- assert(T::isType(*this));
+ assert(T::isKind(*this));
T t;
SVal& sv = t;
sv = *this;
template<typename T>
llvm::Optional<T> getAs() const {
- if (!T::isType(*this))
+ if (!T::isKind(*this))
return llvm::Optional<T>();
T t;
SVal& sv = t;
private:
friend class SVal;
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == UndefinedKind;
}
};
private:
friend class SVal;
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return !V.isUndef();
}
};
private:
friend class SVal;
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == UnknownKind;
}
};
: DefinedOrUnknownSVal(d, isLoc, ValKind) {}
private:
friend class SVal;
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return !V.isUnknownOrUndef();
}
};
private:
friend class SVal;
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == NonLocKind;
}
};
private:
friend class SVal;
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == LocKind;
}
};
private:
friend class SVal;
SymbolVal() {}
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == NonLocKind &&
V.getSubKind() == SymbolValKind;
}
- static bool isType(const NonLoc& V) {
+ static bool isKind(const NonLoc& V) {
return V.getSubKind() == SymbolValKind;
}
};
private:
friend class SVal;
ConcreteInt() {}
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == NonLocKind &&
V.getSubKind() == ConcreteIntKind;
}
- static bool isType(const NonLoc& V) {
+ static bool isKind(const NonLoc& V) {
return V.getSubKind() == ConcreteIntKind;
}
};
private:
friend class SVal;
LocAsInteger() {}
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == NonLocKind &&
V.getSubKind() == LocAsIntegerKind;
}
- static bool isType(const NonLoc& V) {
+ static bool isKind(const NonLoc& V) {
return V.getSubKind() == LocAsIntegerKind;
}
};
private:
friend class SVal;
CompoundVal() {}
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == NonLocKind && V.getSubKind() == CompoundValKind;
}
- static bool isType(const NonLoc& V) {
+ static bool isKind(const NonLoc& V) {
return V.getSubKind() == CompoundValKind;
}
};
private:
friend class SVal;
LazyCompoundVal() {}
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == NonLocKind &&
V.getSubKind() == LazyCompoundValKind;
}
- static bool isType(const NonLoc& V) {
+ static bool isKind(const NonLoc& V) {
return V.getSubKind() == LazyCompoundValKind;
}
};
private:
friend class SVal;
GotoLabel() {}
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == LocKind && V.getSubKind() == GotoLabelKind;
}
- static bool isType(const Loc& V) {
+ static bool isKind(const Loc& V) {
return V.getSubKind() == GotoLabelKind;
}
};
private:
friend class SVal;
MemRegionVal() {}
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == LocKind &&
V.getSubKind() == MemRegionKind;
}
- static bool isType(const Loc& V) {
+ static bool isKind(const Loc& V) {
return V.getSubKind() == MemRegionKind;
}
};
private:
friend class SVal;
ConcreteInt() {}
- static bool isType(const SVal& V) {
+ static bool isKind(const SVal& V) {
return V.getBaseKind() == LocKind &&
V.getSubKind() == ConcreteIntKind;
}
- static bool isType(const Loc& V) {
+ static bool isKind(const Loc& V) {
return V.getSubKind() == ConcreteIntKind;
}
};