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.
llvm-svn: 116917
diff --git a/clang/lib/Rewrite/RewriteObjC.cpp b/clang/lib/Rewrite/RewriteObjC.cpp
index 0e81df7..eac652c 100644
--- a/clang/lib/Rewrite/RewriteObjC.cpp
+++ b/clang/lib/Rewrite/RewriteObjC.cpp
@@ -1213,7 +1213,7 @@
ObjCMethodDecl *OMD = 0;
QualType Ty;
Selector Sel;
- Stmt *Receiver;
+ Stmt *Receiver = 0;
bool Super = false;
QualType SuperTy;
SourceLocation SuperLocation;