From 19562c97669532084a71895197f4444305dd432a Mon Sep 17 00:00:00 2001
From: Benjamin Kramer <benny.kra@googlemail.com>
Date: Mon, 20 Feb 2012 00:20:48 +0000
Subject: [PATCH] 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
---
 lib/AST/Expr.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index b3077cbaa4c..75c450867b5 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -2979,8 +2979,8 @@ void ObjCMessageExpr::initArgsAndSelLocs(ArrayRef<Expr *> Args,
     MyArgs[I] = Args[I];
   }
 
+  SelLocsKind = SelLocsK;
   if (!isImplicit()) {
-    SelLocsKind = SelLocsK;
     if (SelLocsK == SelLoc_NonStandard)
       std::copy(SelLocs.begin(), SelLocs.end(), getStoredSelLocs());
   }
-- 
GitLab