зеркало из https://github.com/microsoft/clang-1.git
Use ArrayRef in ExternalASTSource::SetExternalVisibleDeclsForName.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139357 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
7f3a6d37ba
Коммит
45df9c68b4
|
@ -216,7 +216,7 @@ protected:
|
|||
static DeclContextLookupResult
|
||||
SetExternalVisibleDeclsForName(const DeclContext *DC,
|
||||
DeclarationName Name,
|
||||
SmallVectorImpl<NamedDecl*> &Decls);
|
||||
ArrayRef<NamedDecl*> Decls);
|
||||
|
||||
static DeclContextLookupResult
|
||||
SetNoExternalVisibleDeclsForName(const DeclContext *DC,
|
||||
|
|
|
@ -904,7 +904,7 @@ ExternalASTSource::SetNoExternalVisibleDeclsForName(const DeclContext *DC,
|
|||
DeclContext::lookup_result
|
||||
ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC,
|
||||
DeclarationName Name,
|
||||
SmallVectorImpl<NamedDecl*> &Decls) {
|
||||
ArrayRef<NamedDecl*> Decls) {
|
||||
ASTContext &Context = DC->getParentASTContext();;
|
||||
|
||||
StoredDeclsMap *Map;
|
||||
|
@ -912,11 +912,12 @@ ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC,
|
|||
Map = DC->CreateStoredDeclsMap(Context);
|
||||
|
||||
StoredDeclsList &List = (*Map)[Name];
|
||||
for (unsigned I = 0, N = Decls.size(); I != N; ++I) {
|
||||
for (ArrayRef<NamedDecl*>::iterator
|
||||
I = Decls.begin(), E = Decls.end(); I != E; ++I) {
|
||||
if (List.isNull())
|
||||
List.setOnlyValue(Decls[I]);
|
||||
List.setOnlyValue(*I);
|
||||
else
|
||||
List.AddSubsequentDecl(Decls[I]);
|
||||
List.AddSubsequentDecl(*I);
|
||||
}
|
||||
|
||||
return List.getLookupResult();
|
||||
|
|
Загрузка…
Ссылка в новой задаче