[cfe-commits] r93431 - /cfe/trunk/lib/Sema/SemaCodeComplete.cpp
Douglas Gregor
dgregor at apple.com
Thu Jan 14 08:14:35 PST 2010
Author: dgregor
Date: Thu Jan 14 10:14:35 2010
New Revision: 93431
URL: http://llvm.org/viewvc/llvm-project?rev=93431&view=rev
Log:
Switch a few callers of MaybeAddResult over to AddResult, when the
declarations we're adding do not need any name-hiding checks.
Modified:
cfe/trunk/lib/Sema/SemaCodeComplete.cpp
Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=93431&r1=93430&r2=93431&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Thu Jan 14 10:14:35 2010
@@ -2183,7 +2183,8 @@
if (EnumeratorsSeen.count(*E))
continue;
- Results.MaybeAddResult(CodeCompleteConsumer::Result(*E, Qualifier));
+ Results.AddResult(CodeCompleteConsumer::Result(*E, Qualifier),
+ CurContext, 0, false);
}
Results.ExitScope();
@@ -2359,8 +2360,8 @@
for (std::map<NamespaceDecl *, NamespaceDecl *>::iterator
NS = OrigToLatest.begin(), NSEnd = OrigToLatest.end();
NS != NSEnd; ++NS)
- Results.MaybeAddResult(CodeCompleteConsumer::Result(NS->second, 0),
- CurContext);
+ Results.AddResult(CodeCompleteConsumer::Result(NS->second, 0),
+ CurContext, 0, false);
Results.ExitScope();
}
@@ -3036,7 +3037,7 @@
// Record any protocols we find.
if (ObjCProtocolDecl *Proto = dyn_cast<ObjCProtocolDecl>(*D))
if (!OnlyForwardDeclarations || Proto->isForwardDecl())
- Results.MaybeAddResult(Result(Proto, 0), CurContext);
+ Results.AddResult(Result(Proto, 0), CurContext, 0, false);
// Record any forward-declared protocols we find.
if (ObjCForwardProtocolDecl *Forward
@@ -3046,7 +3047,7 @@
PEnd = Forward->protocol_end();
P != PEnd; ++P)
if (!OnlyForwardDeclarations || (*P)->isForwardDecl())
- Results.MaybeAddResult(Result(*P, 0), CurContext);
+ Results.AddResult(Result(*P, 0), CurContext, 0, false);
}
}
}
@@ -3097,7 +3098,7 @@
if (ObjCInterfaceDecl *Class = dyn_cast<ObjCInterfaceDecl>(*D))
if ((!OnlyForwardDeclarations || Class->isForwardDecl()) &&
(!OnlyUnimplemented || !Class->getImplementation()))
- Results.MaybeAddResult(Result(Class, 0), CurContext);
+ Results.AddResult(Result(Class, 0), CurContext, 0, false);
// Record any forward-declared interfaces we find.
if (ObjCClassDecl *Forward = dyn_cast<ObjCClassDecl>(*D)) {
@@ -3105,7 +3106,8 @@
C != CEnd; ++C)
if ((!OnlyForwardDeclarations || C->getInterface()->isForwardDecl()) &&
(!OnlyUnimplemented || !C->getInterface()->getImplementation()))
- Results.MaybeAddResult(Result(C->getInterface(), 0), CurContext);
+ Results.AddResult(Result(C->getInterface(), 0), CurContext,
+ 0, false);
}
}
}
@@ -3176,7 +3178,7 @@
D != DEnd; ++D)
if (ObjCCategoryDecl *Category = dyn_cast<ObjCCategoryDecl>(*D))
if (CategoryNames.insert(Category->getIdentifier()))
- Results.MaybeAddResult(Result(Category, 0), CurContext);
+ Results.AddResult(Result(Category, 0), CurContext, 0, false);
Results.ExitScope();
HandleCodeCompleteResults(this, CodeCompleter, Results.data(),Results.size());
@@ -3208,7 +3210,7 @@
Category = Category->getNextClassCategory())
if ((!IgnoreImplemented || !Category->getImplementation()) &&
CategoryNames.insert(Category->getIdentifier()))
- Results.MaybeAddResult(Result(Category, 0), CurContext);
+ Results.AddResult(Result(Category, 0), CurContext, 0, false);
Class = Class->getSuperClass();
IgnoreImplemented = false;
@@ -3282,7 +3284,7 @@
for (ObjCInterfaceDecl::ivar_iterator IVar = Class->ivar_begin(),
IVarEnd = Class->ivar_end();
IVar != IVarEnd; ++IVar)
- Results.MaybeAddResult(Result(*IVar, 0), CurContext);
+ Results.AddResult(Result(*IVar, 0), CurContext, 0, false);
}
Results.ExitScope();
More information about the cfe-commits
mailing list