]> granicus.if.org Git - clang/commitdiff
Add default implementation of ConstraintManager::getSymVal() and a doxygen comment.
authorTed Kremenek <kremenek@apple.com>
Fri, 7 Sep 2012 22:24:21 +0000 (22:24 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 7 Sep 2012 22:24:21 +0000 (22:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163426 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h

index e41a90858393e7ec2d4e5b7d5b92db8ad3caacfe..284982f9d4647b4257375135c6032889fea5f62b 100644 (file)
@@ -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;