From: Sylvestre Ledru Date: Sat, 6 Jul 2013 08:00:09 +0000 (+0000) Subject: Remove some useless declarations (found by scan-build) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4cb3d909cb4af5efc073fd4122d4998c466a220e;p=clang Remove some useless declarations (found by scan-build) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185752 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index f5296ce70f..ca75a4f1b8 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -1543,12 +1543,11 @@ ExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) { // with mask. If so, verify that RHS is an integer vector type with the // same number of elts as lhs. if (TheCall->getNumArgs() == 2) { - if (!RHSType->hasIntegerRepresentation() || + if (!RHSType->hasIntegerRepresentation() || RHSType->getAs()->getNumElements() != numElements) Diag(TheCall->getLocStart(), diag::err_shufflevector_incompatible_vector) << SourceRange(TheCall->getArg(1)->getLocStart(), TheCall->getArg(1)->getLocEnd()); - numResElements = numElements; } else if (!Context.hasSameUnqualifiedType(LHSType, RHSType)) { Diag(TheCall->getLocStart(), diag::err_shufflevector_incompatible_vector) diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index da98d4c8a0..e8a6c50388 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -2333,7 +2333,6 @@ HelperSelectorsForTypoCorrection( else if (EditDistance < BestEditDistance) { BestMethod.clear(); BestMethod.push_back(Method); - BestEditDistance = EditDistance; } }