Fix some use of uninit variables issues, reported by Anton.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42396 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/CFG.cpp b/AST/CFG.cpp
index d91f9c3..e1c1a74 100644
--- a/AST/CFG.cpp
+++ b/AST/CFG.cpp
@@ -393,7 +393,7 @@
CFGBlock* CFGBuilder::VisitCompoundStmt(CompoundStmt* C) {
// The value returned from this function is the last created CFGBlock
// that represents the "entry" point for the translated AST node.
- CFGBlock* LastBlock;
+ CFGBlock* LastBlock = 0;
for (CompoundStmt::reverse_body_iterator I = C->body_rbegin(),
E = C->body_rend(); I != E; ++I )
diff --git a/Parse/ParseObjc.cpp b/Parse/ParseObjc.cpp
index 16434cd..9da15fa 100644
--- a/Parse/ParseObjc.cpp
+++ b/Parse/ParseObjc.cpp
@@ -445,7 +445,7 @@
assert(Tok.getKind() == tok::l_paren && "expected (");
SourceLocation LParenLoc = ConsumeParen(), RParenLoc;
- TypeTy *Ty;
+ TypeTy *Ty = 0;
while (isObjCTypeQualifier())
ConsumeToken();
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index ae9c719..dd8fe22 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -485,7 +485,7 @@
QualType R = GetTypeForDeclarator(D, S);
assert(!R.isNull() && "GetTypeForDeclarator() returned null type");
- FunctionDecl::StorageClass SC;
+ FunctionDecl::StorageClass SC = FunctionDecl::None;
switch (D.getDeclSpec().getStorageClassSpec()) {
default: assert(0 && "Unknown storage class!");
case DeclSpec::SCS_auto: