From: Ted Kremenek Date: Fri, 7 Sep 2012 22:24:21 +0000 (+0000) Subject: Add default implementation of ConstraintManager::getSymVal() and a doxygen comment. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=526b4a63cd567393fd43af837ac9d0f35fc267f7;p=clang Add default implementation of ConstraintManager::getSymVal() and a doxygen comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163426 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h index e41a908583..284982f9d4 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h @@ -43,8 +43,15 @@ public: return res; } + /// \brief If a symbol is perfectly constrained to a constant, attempt + /// to return the concrete value. + /// + /// Note that a ConstraintManager is not obligated to return a concretized + /// value for a symbol, even if it is perfectly constrained. virtual const llvm::APSInt* getSymVal(ProgramStateRef state, - SymbolRef sym) const = 0; + SymbolRef sym) const { + return 0; + } virtual ProgramStateRef removeDeadBindings(ProgramStateRef state, SymbolReaper& SymReaper) = 0;