aboutsummaryrefslogtreecommitdiff
path: root/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h')
-rw-r--r--clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
index ac218bc070e9..a001c0dc7030 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
@@ -157,6 +157,10 @@ public:
const llvm::APSInt &Convert(QualType T, const llvm::APSInt &From) {
APSIntType TargetType = getAPSIntType(T);
+ return Convert(TargetType, From);
+ }
+
+ const llvm::APSInt &Convert(APSIntType TargetType, const llvm::APSInt &From) {
if (TargetType == APSIntType(From))
return From;
@@ -177,11 +181,19 @@ public:
}
const llvm::APSInt &getMaxValue(QualType T) {
- return getValue(getAPSIntType(T).getMaxValue());
+ return getMaxValue(getAPSIntType(T));
}
const llvm::APSInt &getMinValue(QualType T) {
- return getValue(getAPSIntType(T).getMinValue());
+ return getMinValue(getAPSIntType(T));
+ }
+
+ const llvm::APSInt &getMaxValue(APSIntType T) {
+ return getValue(T.getMaxValue());
+ }
+
+ const llvm::APSInt &getMinValue(APSIntType T) {
+ return getValue(T.getMinValue());
}
const llvm::APSInt &Add1(const llvm::APSInt &V) {