aboutsummaryrefslogtreecommitdiff
path: root/lib/Rewrite/RewriteObjC.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-10-20 08:21:16 +0000
committerDuncan Sands <baldrick@free.fr>2010-10-20 08:21:16 +0000
commit54bd4577762228fdca4367dbc3af5e13e7f21389 (patch)
tree3a7ab368e01ba39d81ebb374b22d3ee2cd63d4e7 /lib/Rewrite/RewriteObjC.cpp
parentaa56a66abb61e9f42b48ae88e43328aba10c9148 (diff)
GCC 4.4 warns that Receiver may be used uninitialized in this function.
As far as I can see, gcc is right to think this! The following change will cause a nice segfault rather than undefined behaviour if this case occurs. Someone who understands what this code is supposed to do should probably take a proper look. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116917 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/RewriteObjC.cpp')
-rw-r--r--lib/Rewrite/RewriteObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Rewrite/RewriteObjC.cpp b/lib/Rewrite/RewriteObjC.cpp
index 0e81df72c5..eac652c103 100644
--- a/lib/Rewrite/RewriteObjC.cpp
+++ b/lib/Rewrite/RewriteObjC.cpp
@@ -1213,7 +1213,7 @@ Stmt *RewriteObjC::RewritePropertyOrImplicitSetter(BinaryOperator *BinOp, Expr *
ObjCMethodDecl *OMD = 0;
QualType Ty;
Selector Sel;
- Stmt *Receiver;
+ Stmt *Receiver = 0;
bool Super = false;
QualType SuperTy;
SourceLocation SuperLocation;