From 6c656c3d89523d8ddd143f96e11f6bc16c10c60b Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 4 Apr 2012 00:55:21 +0000 Subject: [PATCH] Remove dead assignment to local variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153985 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaChecking.cpp | 1 - lib/Sema/SemaDeclCXX.cpp | 1 - lib/Sema/SemaExpr.cpp | 2 -- lib/Serialization/ASTReader.cpp | 1 - 4 files changed, 5 deletions(-) diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 0e2eb3c701..74832fd32e 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -1176,7 +1176,6 @@ bool Sema::SemaBuiltinFPClassification(CallExpr *TheCall, unsigned NumArgs) { "promotion from float to double is the only expected cast here"); Cast->setSubExpr(0); TheCall->setArg(NumArgs-1, CastArg); - OrigArg = CastArg; } } diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index a6d564e316..e5dc4f5ac9 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -5776,7 +5776,6 @@ static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc, S.Diag(Corrected.getCorrectionDecl()->getLocation(), diag::note_namespace_defined_here) << CorrectedQuotedStr; - Ident = Corrected.getCorrectionAsIdentifierInfo(); R.addDecl(Corrected.getCorrectionDecl()); return true; } diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 2478b03449..d424f388f6 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -3610,8 +3610,6 @@ Sema::ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, << FixItHint::CreateRemoval( SourceRange(Args[0]->getLocStart(), Args[NumArgs-1]->getLocEnd())); - - NumArgs = 0; } return Owned(new (Context) CallExpr(Context, Fn, 0, 0, Context.VoidTy, diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 840fa13282..f91b66cf54 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -3350,7 +3350,6 @@ bool ASTReader::ParseLanguageOptions( unsigned Length = Record[Idx++]; LangOpts.CurrentModule.assign(Record.begin() + Idx, Record.begin() + Idx + Length); - Idx += Length; return Listener->ReadLanguageOptions(LangOpts); } -- 2.40.0