[cfe-commits] r78414 - in /cfe/trunk: include/clang/AST/DeclBase.h lib/Sema/Sema.h lib/Sema/SemaLookup.cpp
Douglas Gregor
dgregor at apple.com
Fri Aug 7 15:35:27 PDT 2009
On Aug 7, 2009, at 3:18 PM, John McCall wrote:
> Author: rjmccall
> Date: Fri Aug 7 17:18:02 2009
> New Revision: 78414
>
> URL: http://llvm.org/viewvc/llvm-project?rev=78414&view=rev
> Log:
> Just add global scope to the associated namespaces set instead of
> tracking it
> separately.
That's much cleaner; thanks!
> Add the framework (currently unfed) for finding friend declarations
> during argument-dependent lookup.
Looks like a good start.
> + for (llvm::tie(I, E) = (*AC)->lookup(Name); I != E; ++I) {
> + Decl *D = *I;
> + if (!D->isInIdentifierNamespace(Decl::IDNS_Friend))
> + continue;
> +
> + DeclContext *DC = D->getDeclContext();
> + if (!AssociatedNamespaces.count(DC))
> + continue;
> +
> + CollectFunctionDecl(Functions, D);
> }
The AssociatedNamespaces.count(DC) check is redundant, right? We'll
eliminate duplicates when the function or function template is
introduced into the FunctionSet.
- Doug
More information about the cfe-commits
mailing list