From: Benjamin Kramer Date: Mon, 20 Feb 2012 00:20:48 +0000 (+0000) Subject: ObjCMessageExpr: Don't leave SelLocsKind uninitialized when the send is implicit. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19562c97669532084a71895197f4444305dd432a;p=clang ObjCMessageExpr: Don't leave SelLocsKind uninitialized when the send is implicit. Fixes PR11929. Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150943 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index b3077cbaa4..75c450867b 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -2979,8 +2979,8 @@ void ObjCMessageExpr::initArgsAndSelLocs(ArrayRef Args, MyArgs[I] = Args[I]; } + SelLocsKind = SelLocsK; if (!isImplicit()) { - SelLocsKind = SelLocsK; if (SelLocsK == SelLoc_NonStandard) std::copy(SelLocs.begin(), SelLocs.end(), getStoredSelLocs()); }