[cfe-commits] r147678 - /cfe/trunk/lib/Rewrite/RewriteObjC.cpp

Chad Rosier mcrosier at apple.com
Fri Jan 6 12:05:14 PST 2012


Author: mcrosier
Date: Fri Jan  6 14:05:14 2012
New Revision: 147678

URL: http://llvm.org/viewvc/llvm-project?rev=147678&view=rev
Log:
Fix uninitialized variable warning.

Modified:
    cfe/trunk/lib/Rewrite/RewriteObjC.cpp

Modified: cfe/trunk/lib/Rewrite/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/RewriteObjC.cpp?rev=147678&r1=147677&r2=147678&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteObjC.cpp Fri Jan  6 14:05:14 2012
@@ -1288,7 +1288,7 @@
   SmallVector<SourceLocation, 1> SelLocs;
   OldMsg->getSelectorLocs(SelLocs);
 
-  ObjCMessageExpr *NewMsg;
+  ObjCMessageExpr *NewMsg = 0;
   switch (OldMsg->getReceiverKind()) {
   case ObjCMessageExpr::Class:
     NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(),
@@ -1361,7 +1361,7 @@
   SmallVector<SourceLocation, 1> SelLocs;
   SmallVector<Expr*, 1> Args;
 
-  ObjCMessageExpr *NewMsg;
+  ObjCMessageExpr *NewMsg = 0;
   switch (OldMsg->getReceiverKind()) {
   case ObjCMessageExpr::Class:
     NewMsg = ObjCMessageExpr::Create(*Context, OldMsg->getType(),





More information about the cfe-commits mailing list