diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-01-20 14:57:34 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-01-20 14:57:34 +0000 |
commit | b7ff74a6764ad837ce348bc7dd0f0804e4dbf492 (patch) | |
tree | 543687a1d19dfdbc51f0c6581f9d6234c1a16ed0 /lib/Sema/SemaExpr.cpp | |
parent | dc370c1e70a2f876c65be4057ead751b72c8ddd5 (diff) |
Localize variable, remove unused assignment.
Found by the clang static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148544 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 0b0b825ed2..be6b9653d5 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1742,7 +1742,6 @@ ExprResult Sema::ActOnIdExpression(Scope *S, return ActOnDependentIdExpression(SS, NameInfo, IsAddressOfOperand, TemplateArgs); - bool IvarLookupFollowUp = false; // Perform the required lookup. LookupResult R(*this, NameInfo, (Id.getKind() == UnqualifiedId::IK_ImplicitSelfParam) @@ -1762,7 +1761,7 @@ ExprResult Sema::ActOnIdExpression(Scope *S, return ActOnDependentIdExpression(SS, NameInfo, IsAddressOfOperand, TemplateArgs); } else { - IvarLookupFollowUp = (!SS.isSet() && II && getCurMethodDecl()); + bool IvarLookupFollowUp = II && !SS.isSet() && getCurMethodDecl(); LookupParsedName(R, S, &SS, !IvarLookupFollowUp); // If the result might be in a dependent base class, this is a dependent @@ -1780,9 +1779,6 @@ ExprResult Sema::ActOnIdExpression(Scope *S, if (Expr *Ex = E.takeAs<Expr>()) return Owned(Ex); - - // for further use, this must be set to false if in class method. - IvarLookupFollowUp = getCurMethodDecl()->isInstanceMethod(); } } |