[cfe-commits] r163426 - /cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h

Ted Kremenek kremenek at apple.com
Fri Sep 7 15:24:21 PDT 2012


Author: kremenek
Date: Fri Sep  7 17:24:21 2012
New Revision: 163426

URL: http://llvm.org/viewvc/llvm-project?rev=163426&view=rev
Log:
Add default implementation of ConstraintManager::getSymVal() and a doxygen comment.

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h?rev=163426&r1=163425&r2=163426&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h Fri Sep  7 17:24:21 2012
@@ -43,8 +43,15 @@
     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;





More information about the cfe-commits mailing list