From 2caf586d2fa9b864e54ab511d5fd238387dbe078 Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Fri, 31 Oct 2008 06:05:32 +0000 Subject: [PATCH] Add a tentative assertion. llvm-svn: 58492 --- clang/lib/Analysis/GRExprEngine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index cf8c25a2277d..21fe3daa7a67 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/lib/Analysis/GRExprEngine.cpp @@ -861,10 +861,11 @@ void GRExprEngine::VisitDeclRefExpr(DeclRefExpr* Ex, NodeTy* Pred, NodeSet& Dst, return; } else if (const FunctionDecl* FD = dyn_cast(D)) { - // We return the loc::FuncVal for an FunctionDecl in both rvalue - // and lvalue contexts. // FIXME: Does this need to be revised? We were getting cases in // real code that did this. + + assert(asLValue); // Can we assume this? + SVal V = loc::FuncVal(FD); MakeNode(Dst, Ex, Pred, BindExpr(St, Ex, V)); return;