diff options
Diffstat (limited to 'include/clang/Checker/PathSensitive/ValueManager.h')
-rw-r--r-- | include/clang/Checker/PathSensitive/ValueManager.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Checker/PathSensitive/ValueManager.h b/include/clang/Checker/PathSensitive/ValueManager.h index f80ad421742fa..5a9d54d337b0e 100644 --- a/include/clang/Checker/PathSensitive/ValueManager.h +++ b/include/clang/Checker/PathSensitive/ValueManager.h @@ -22,6 +22,7 @@ #include "clang/Checker/PathSensitive/BasicValueFactory.h" #include "clang/Checker/PathSensitive/SymbolManager.h" #include "clang/Checker/PathSensitive/SValuator.h" +#include "clang/AST/ExprCXX.h" namespace llvm { class BumpPtrAllocator; } @@ -133,6 +134,11 @@ public: I->getType()->isUnsignedIntegerType())); } + nonloc::ConcreteInt makeIntVal(const CXXBoolLiteralExpr *E) { + return E->getValue() ? nonloc::ConcreteInt(BasicVals.getValue(1, 1, true)) + : nonloc::ConcreteInt(BasicVals.getValue(0, 1, true)); + } + nonloc::ConcreteInt makeIntVal(const llvm::APSInt& V) { return nonloc::ConcreteInt(BasicVals.getValue(V)); } |