diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-10-17 00:55:33 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-10-17 00:55:33 +0000 |
commit | cd162ccbbf96fcdc1f62f3bb604ae4455af3a442 (patch) | |
tree | 782d692ce0e3706a39dac4b132a3140f4aebec22 /lib/Analysis/GRExprEngine.cpp | |
parent | 3397e467f5f20fb0c54fc1a30f99c2559661938a (diff) |
Remove an untrue assertion: lval::FuncVals can be returned in both rvalue and lvalue contexts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index 2bc46d5990..1c0773a89c 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -834,8 +834,10 @@ void GRExprEngine::VisitDeclRefExpr(DeclRefExpr* Ex, NodeTy* Pred, NodeSet& Dst, return; } else if (const FunctionDecl* FD = dyn_cast<FunctionDecl>(D)) { - assert(!asLValue && "FunctionDecl does not have lvalue."); - + // We return the lval::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. RVal V = lval::FuncVal(FD); MakeNode(Dst, Ex, Pred, SetRVal(St, Ex, V)); return; |