summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-10-17 00:55:33 +0000
committerTed Kremenek <kremenek@apple.com>2008-10-17 00:55:33 +0000
commit357c63ab37338785b8e86926c8cce695e99a219a (patch)
tree37721179337bc77ce08c005f2efcd7ff854743cc /clang/lib/Analysis/GRExprEngine.cpp
parent7ff153c9cbeb93f2b52257a5888ff2590f801785 (diff)
downloadbcm5719-llvm-357c63ab37338785b8e86926c8cce695e99a219a.tar.gz
bcm5719-llvm-357c63ab37338785b8e86926c8cce695e99a219a.zip
Remove an untrue assertion: lval::FuncVals can be returned in both rvalue and lvalue contexts.
llvm-svn: 57659
Diffstat (limited to 'clang/lib/Analysis/GRExprEngine.cpp')
-rw-r--r--clang/lib/Analysis/GRExprEngine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp
index 2bc46d59902..1c0773a89c7 100644
--- a/clang/lib/Analysis/GRExprEngine.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud