[cfe-commits] r60574 - in /cfe/trunk/lib/Sema: IdentifierResolver.cpp IdentifierResolver.h

Zhongxing Xu xuzhongxing at gmail.com
Thu Dec 4 17:57:57 PST 2008


Author: zhongxingxu
Date: Thu Dec  4 19:57:57 2008
New Revision: 60574

URL: http://llvm.org/viewvc/llvm-project?rev=60574&view=rev
Log:
Rename: FindContext -> FindDeclVisibleInContext.

Modified:
    cfe/trunk/lib/Sema/IdentifierResolver.cpp
    cfe/trunk/lib/Sema/IdentifierResolver.h

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

==============================================================================
--- cfe/trunk/lib/Sema/IdentifierResolver.cpp (original)
+++ cfe/trunk/lib/Sema/IdentifierResolver.cpp Thu Dec  4 19:57:57 2008
@@ -90,7 +90,8 @@
 /// in the given context or in a parent of it. The search is in reverse
 /// order, from end to begin.
 IdentifierResolver::IdDeclInfo::DeclsTy::iterator
-IdentifierResolver::IdDeclInfo::FindContext(const LookupContext &Ctx,
+IdentifierResolver::IdDeclInfo::FindDeclVisibleInContext(
+                                            const LookupContext &Ctx,
                                             const DeclsTy::iterator &Start) {
   for (DeclsTy::iterator I = Start; I != Decls.begin(); --I) {
     if (Ctx.isEqOrContainedBy(LookupContext(*(I-1))))
@@ -267,7 +268,7 @@
 
   IdDeclInfo::DeclsTy::iterator I;
   if (LookInParentCtx)
-    I = IDI->FindContext(LC);
+    I = IDI->FindDeclVisibleInContext(LC);
   else {
     for (I = IDI->decls_end(); I != IDI->decls_begin(); --I)
       if (LookupContext(*(I-1)) == LC)
@@ -290,7 +291,7 @@
 
   BaseIter I = getIterator();
   if (LookInParentCtx())
-    I = Info->FindContext(Ctx, I);
+    I = Info->FindDeclVisibleInContext(Ctx, I);
   else {
     if (I != Info->decls_begin() && LookupContext(*(I-1)) != Ctx) {
       // The next decl is in different declaration context.

Modified: cfe/trunk/lib/Sema/IdentifierResolver.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/IdentifierResolver.h?rev=60574&r1=60573&r2=60574&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/IdentifierResolver.h (original)
+++ cfe/trunk/lib/Sema/IdentifierResolver.h Thu Dec  4 19:57:57 2008
@@ -94,18 +94,18 @@
     /// FindContext - Returns an iterator pointing just after the decl that is
     /// in the given context or in a parent of it. The search is in reverse
     /// order, from end to begin.
-    DeclsTy::iterator FindContext(const LookupContext &Ctx) {
-      return FindContext(Ctx, Decls.end());
+    DeclsTy::iterator FindDeclVisibleInContext(const LookupContext &Ctx) {
+      return FindDeclVisibleInContext(Ctx, Decls.end());
     }
 
     /// FindContext - Returns an iterator pointing just after the decl that is
     /// in the given context or in a parent of it. The search is in reverse
     /// order, from end to begin.
-    DeclsTy::iterator FindContext(const LookupContext &Ctx,
+    DeclsTy::iterator FindDeclVisibleInContext(const LookupContext &Ctx,
                                   const DeclsTy::iterator &Start);
 
     void AddDecl(NamedDecl *D) {
-      Decls.insert(FindContext(LookupContext(D)), D);
+      Decls.insert(FindDeclVisibleInContext(LookupContext(D)), D);
     }
 
     /// AddShadowed - Add a decl by putting it directly above the 'Shadow' decl.





More information about the cfe-commits mailing list