diff options
| author | John McCall <rjmccall@apple.com> | 2010-01-26 07:16:45 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-01-26 07:16:45 +0000 |
| commit | 8fe6808de0d1bd29b4c1f51ceb1442ee21fa0fa1 (patch) | |
| tree | 3c04d80f5a65590cfc2ff889947e0cca2bf111ca /clang/lib/Sema/Sema.h | |
| parent | 547c761dd6578896a80e649d2ca4ec4446ea3e44 (diff) | |
| download | bcm5719-llvm-8fe6808de0d1bd29b4c1f51ceb1442ee21fa0fa1.tar.gz bcm5719-llvm-8fe6808de0d1bd29b4c1f51ceb1442ee21fa0fa1.zip | |
Handle redeclarations found by ADL deterministically and reasonably.
This solution relies on an O(n) scan of redeclarations, which means it might
scale poorly in crazy cases with tons of redeclarations brought in by a ton
of distinct associated namespaces. I believe that avoiding this
is not worth the common-case cost.
llvm-svn: 94530
Diffstat (limited to 'clang/lib/Sema/Sema.h')
| -rw-r--r-- | clang/lib/Sema/Sema.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 42dac8fafc1..d041f54a023 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -103,6 +103,7 @@ namespace clang { class InitializationSequence; class VisibleDeclConsumer; class TargetAttributesSema; + class ADLResult; /// BlockSemaInfo - When a block is being parsed, this contains information /// about the block. It is pointed to from Sema::CurBlock. @@ -950,8 +951,6 @@ public: // Members have to be NamespaceDecl* or TranslationUnitDecl*. // TODO: make this is a typesafe union. typedef llvm::SmallPtrSet<DeclContext *, 16> AssociatedNamespaceSet; - // Members have to be a function or function template. - typedef llvm::SmallPtrSet<NamedDecl*, 16> ADLFunctionSet; typedef llvm::SmallPtrSet<CXXRecordDecl *, 16> AssociatedClassSet; void AddOverloadCandidate(NamedDecl *Function, @@ -1240,7 +1239,7 @@ public: void ArgumentDependentLookup(DeclarationName Name, bool Operator, Expr **Args, unsigned NumArgs, - ADLFunctionSet &Functions); + ADLResult &Functions); void LookupVisibleDecls(Scope *S, LookupNameKind Kind, VisibleDeclConsumer &Consumer); |

