From: Ted Kremenek Date: Fri, 24 Oct 2008 21:10:49 +0000 (+0000) Subject: Implicit conversions from arrays can also be conversions to references (will add... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b50f5bdd66e3124775eff41f33d6ab0890b315e;p=clang Implicit conversions from arrays can also be conversions to references (will add a test case shortly). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58110 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index acfd7a1993..b88b80c562 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -1507,7 +1507,7 @@ void GRExprEngine::VisitCast(Expr* CastE, Expr* Ex, NodeTy* Pred, NodeSet& Dst){ // StoreManager casts array to different values. if (ExTy->isArrayType()) { - assert(T->isPointerType()); + assert(T->isPointerType() || T->isReferenceType()); V = StateMgr.ArrayToPointer(V); MakeNode(Dst, CastE, N, SetSVal(St, CastE, V));