[cfe-commits] r148544 - /cfe/trunk/lib/Sema/SemaExpr.cpp

Benjamin Kramer benny.kra at googlemail.com
Fri Jan 20 06:57:34 PST 2012


Author: d0k
Date: Fri Jan 20 08:57:34 2012
New Revision: 148544

URL: http://llvm.org/viewvc/llvm-project?rev=148544&view=rev
Log:
Localize variable, remove unused assignment.

Found by the clang static analyzer.

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=148544&r1=148543&r2=148544&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Fri Jan 20 08:57:34 2012
@@ -1742,7 +1742,6 @@
     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 @@
       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 @@
 
       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();
     }
   }
 





More information about the cfe-commits mailing list