Added skeleton code for tracking the values of function parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46477 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Analysis/GRConstants.cpp b/Analysis/GRConstants.cpp
index f003007..a0a58db 100644
--- a/Analysis/GRConstants.cpp
+++ b/Analysis/GRConstants.cpp
@@ -619,6 +619,22 @@
/// in the ExplodedGraph.
StateTy getInitialState() {
StateTy St = StateMgr.GetEmptyMap();
+
+ // Iterate the parameters.
+ FunctionDecl& F = G.getFunctionDecl();
+
+ for (FunctionDecl::param_iterator I=F.param_begin(), E=F.param_end();
+ I!=E; ++I) {
+
+ // For now we only support symbolic values for non-pointer types.
+ if ((*I)->getType()->isPointerType() ||
+ (*I)->getType()->isReferenceType())
+ continue;
+
+ // FIXME: Set these values to a symbol, not Uninitialized.
+ St = SetValue(St, LValueDecl(*I), UninitializedValue());
+ }
+
return St;
}