[cfe-commits] r65293 - /cfe/trunk/lib/Sema/SemaExprObjC.cpp

Steve Naroff snaroff at apple.com
Sun Feb 22 11:41:00 PST 2009


Author: snaroff
Date: Sun Feb 22 13:41:00 2009
New Revision: 65293

URL: http://llvm.org/viewvc/llvm-project?rev=65293&view=rev
Log:
Minor cleanup, replace bool with qual_empty().

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

Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=65293&r1=65292&r2=65293&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Sun Feb 22 13:41:00 2009
@@ -416,12 +416,10 @@
     // The idea is to add class info to InstanceMethodPool.
     Method = ClassDecl->lookupInstanceMethod(Sel);
     
-    bool haveQualifiers = false;
     if (!Method) {
       // Search protocol qualifiers.
       for (ObjCQualifiedIdType::qual_iterator QI = OCIReceiver->qual_begin(),
            E = OCIReceiver->qual_end(); QI != E; ++QI) {
-        haveQualifiers = true;
         if ((Method = (*QI)->lookupInstanceMethod(Sel)))
           break;
       }
@@ -435,7 +433,7 @@
           // If we still haven't found a method, look in the global pool. This
           // behavior isn't very desirable, however we need it for GCC
           // compatibility. FIXME: should we deviate??
-          if (!Method && !haveQualifiers)
+          if (!Method && OCIReceiver->qual_empty())
             Method = LookupInstanceMethodInGlobalPool(
                                  Sel, SourceRange(lbrac,rbrac));
     }





More information about the cfe-commits mailing list