[cfe-commits] r62270 - in /cfe/trunk/lib: AST/ExprConstant.cpp Analysis/SymbolManager.cpp CodeGen/CGObjC.cpp Sema/SemaLookup.cpp
Daniel Dunbar
daniel at zuster.org
Thu Jan 15 10:32:35 PST 2009
Author: ddunbar
Date: Thu Jan 15 12:32:35 2009
New Revision: 62270
URL: http://llvm.org/viewvc/llvm-project?rev=62270&view=rev
Log:
Fix some unused variable, control reaches end of non-void function,
and uninitialized use options.
Modified:
cfe/trunk/lib/AST/ExprConstant.cpp
cfe/trunk/lib/Analysis/SymbolManager.cpp
cfe/trunk/lib/CodeGen/CGObjC.cpp
cfe/trunk/lib/Sema/SemaLookup.cpp
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=62270&r1=62269&r2=62270&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Thu Jan 15 12:32:35 2009
@@ -1219,6 +1219,7 @@
APSInt Expr::EvaluateAsInt(ASTContext &Ctx) const {
EvalResult EvalResult;
bool Result = Evaluate(EvalResult, Ctx);
+ Result = Result;
assert(Result && "Could not evaluate expression");
assert(EvalResult.Val.isInt() && "Expression did not evaluate to integer");
Modified: cfe/trunk/lib/Analysis/SymbolManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/SymbolManager.cpp?rev=62270&r1=62269&r2=62270&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/SymbolManager.cpp (original)
+++ cfe/trunk/lib/Analysis/SymbolManager.cpp Thu Jan 15 12:32:35 2009
@@ -24,6 +24,8 @@
SymbolRef SymbolManager::getSymbol(const MemRegion* R) {
switch (R->getKind()) {
+ default:
+ assert(0 && "unprocessed region");
case MemRegion::VarRegionKind:
return getSymbol(cast<VarRegion>(R)->getDecl());
@@ -38,8 +40,6 @@
const FieldRegion* FR = cast<FieldRegion>(R);
return getFieldSymbol(FR->getSuperRegion(), FR->getDecl());
}
- default:
- assert(0 && "unprocessed region");
}
}
Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=62270&r1=62269&r2=62270&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Thu Jan 15 12:32:35 2009
@@ -301,15 +301,14 @@
EmitScalarExpr(E->getBase()),
false, CallArgList());
}
- else if (const ObjCKVCRefExpr *E = dyn_cast<ObjCKVCRefExpr>(Exp)) {
+ else {
+ const ObjCKVCRefExpr *E = cast<ObjCKVCRefExpr>(Exp);
Selector S = E->getGetterMethod()->getSelector();
return CGM.getObjCRuntime().
GenerateMessageSend(*this, Exp->getType(), S,
EmitScalarExpr(E->getBase()),
false, CallArgList());
}
- else
- assert (0 && "bad expression node in EmitObjCPropertyGet");
}
void CodeGenFunction::EmitObjCPropertySet(const Expr *Exp,
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=62270&r1=62269&r2=62270&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Thu Jan 15 12:32:35 2009
@@ -490,7 +490,7 @@
// the result of the lookup.
// FIXME: support using declarations!
QualType SubobjectType;
- int SubobjectNumber;
+ int SubobjectNumber = 0;
for (BasePaths::paths_iterator Path = Paths.begin(), PathEnd = Paths.end();
Path != PathEnd; ++Path) {
const BasePathElement &PathElement = Path->back();
More information about the cfe-commits
mailing list