forked from OSchip/llvm-project
Fix some unused variable, control reaches end of non-void function,
and uninitialized use options. llvm-svn: 62270
This commit is contained in:
parent
8bdc698336
commit
435bbe0254
|
@ -1219,6 +1219,7 @@ bool Expr::isEvaluatable(ASTContext &Ctx) const {
|
|||
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");
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@ void SymbolRef::print(llvm::raw_ostream& os) const {
|
|||
|
||||
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 @@ SymbolRef SymbolManager::getSymbol(const MemRegion* R) {
|
|||
const FieldRegion* FR = cast<FieldRegion>(R);
|
||||
return getFieldSymbol(FR->getSuperRegion(), FR->getDecl());
|
||||
}
|
||||
default:
|
||||
assert(0 && "unprocessed region");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -301,15 +301,14 @@ RValue CodeGenFunction::EmitObjCPropertyGet(const Expr *Exp) {
|
|||
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,
|
||||
|
|
|
@ -490,7 +490,7 @@ Sema::LookupQualifiedName(DeclContext *LookupCtx, DeclarationName Name,
|
|||
// 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();
|
||||
|
|
Loading…
Reference in New Issue