[cfe-commits] r47463 - /cfe/trunk/Analysis/ValueState.cpp

Ted Kremenek kremenek at apple.com
Thu Feb 21 15:17:39 PST 2008


Author: kremenek
Date: Thu Feb 21 17:17:39 2008
New Revision: 47463

URL: http://llvm.org/viewvc/llvm-project?rev=47463&view=rev
Log:
Return "Unknown" when using the value of a function pointer whose value
is symbolic.

Modified:
    cfe/trunk/Analysis/ValueState.cpp

Modified: cfe/trunk/Analysis/ValueState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/ValueState.cpp?rev=47463&r1=47462&r2=47463&view=diff

==============================================================================
--- cfe/trunk/Analysis/ValueState.cpp (original)
+++ cfe/trunk/Analysis/ValueState.cpp Thu Feb 21 17:17:39 2008
@@ -156,7 +156,11 @@
       const lval::SymbolVal& SV = cast<lval::SymbolVal>(LV);
       assert (T.getTypePtr());
       
-      if (T.getTypePtr()->isPointerType())
+      // Punt on "symbolic" function pointers.
+      if (T->isFunctionType())
+        return UnknownVal();
+      
+      if (T->isPointerType())
         return lval::SymbolVal(SymMgr.getContentsOfSymbol(SV.getSymbol()));
       else
         return nonlval::SymbolVal(SymMgr.getContentsOfSymbol(SV.getSymbol()));





More information about the cfe-commits mailing list