diff options
author | John McCall <rjmccall@apple.com> | 2009-11-17 02:14:36 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-11-17 02:14:36 +0000 |
commit | a24dc2e38c7fb0f7f138b3d14b5f0f241fd0eccf (patch) | |
tree | d040e3cf363229c97136c3663a267a040760acd8 /lib/Sema/SemaAttr.cpp | |
parent | 936d2a8a3968231199dddbc78378e8fddbab6e25 (diff) |
Carry lookup configuration throughout lookup on the LookupResult. Give
LookupResult RAII powers to diagnose ambiguity in the results. Other diagnostics
(e.g. access control and deprecation) will be moved to automatically trigger
during lookup as part of this same mechanism.
This abstraction makes it much easier to encapsulate aliasing declarations
(e.g. using declarations) inside the lookup system: eventually, lookup will
just produce the aliases in the LookupResult, and the standard access methods
will naturally strip the aliases off.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAttr.cpp')
-rw-r--r-- | lib/Sema/SemaAttr.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp index 0a5335a2be..e2eb87f25e 100644 --- a/lib/Sema/SemaAttr.cpp +++ b/lib/Sema/SemaAttr.cpp @@ -179,10 +179,8 @@ void Sema::ActOnPragmaUnused(const Token *Identifiers, unsigned NumIdentifiers, for (unsigned i = 0; i < NumIdentifiers; ++i) { const Token &Tok = Identifiers[i]; IdentifierInfo *Name = Tok.getIdentifierInfo(); - LookupResult Lookup; - LookupParsedName(Lookup, curScope, NULL, Name,LookupOrdinaryName, - false, true, Tok.getLocation()); - // FIXME: Handle Lookup.isAmbiguous? + LookupResult Lookup(*this, Name, Tok.getLocation(), LookupOrdinaryName); + LookupParsedName(Lookup, curScope, NULL, true); NamedDecl *ND = Lookup.getAsSingleDecl(Context); |