[cfe-commits] r42396 - in /cfe/trunk: AST/CFG.cpp Parse/ParseObjc.cpp Sema/SemaDecl.cpp
Chris Lattner
sabre at nondot.org
Thu Sep 27 08:15:47 PDT 2007
Author: lattner
Date: Thu Sep 27 10:15:46 2007
New Revision: 42396
URL: http://llvm.org/viewvc/llvm-project?rev=42396&view=rev
Log:
Fix some use of uninit variables issues, reported by Anton.
Modified:
cfe/trunk/AST/CFG.cpp
cfe/trunk/Parse/ParseObjc.cpp
cfe/trunk/Sema/SemaDecl.cpp
Modified: cfe/trunk/AST/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/CFG.cpp?rev=42396&r1=42395&r2=42396&view=diff
==============================================================================
--- cfe/trunk/AST/CFG.cpp (original)
+++ cfe/trunk/AST/CFG.cpp Thu Sep 27 10:15:46 2007
@@ -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 )
Modified: cfe/trunk/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseObjc.cpp?rev=42396&r1=42395&r2=42396&view=diff
==============================================================================
--- cfe/trunk/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/Parse/ParseObjc.cpp Thu Sep 27 10:15:46 2007
@@ -445,7 +445,7 @@
assert(Tok.getKind() == tok::l_paren && "expected (");
SourceLocation LParenLoc = ConsumeParen(), RParenLoc;
- TypeTy *Ty;
+ TypeTy *Ty = 0;
while (isObjCTypeQualifier())
ConsumeToken();
Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=42396&r1=42395&r2=42396&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Thu Sep 27 10:15:46 2007
@@ -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:
More information about the cfe-commits
mailing list