aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/AST/ExprConstant.cpp1
-rw-r--r--lib/Analysis/SymbolManager.cpp4
-rw-r--r--lib/CodeGen/CGObjC.cpp5
-rw-r--r--lib/Sema/SemaLookup.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index de6a14b87b..6d98952545 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -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");
diff --git a/lib/Analysis/SymbolManager.cpp b/lib/Analysis/SymbolManager.cpp
index 746d55c23c..f8f8555949 100644
--- a/lib/Analysis/SymbolManager.cpp
+++ b/lib/Analysis/SymbolManager.cpp
@@ -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");
}
}
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index a285d7533a..29740fdf8f 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -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,
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index cc9a36ced2..6ef93ced24 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -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();