From 27b18f8144b7cb3ec9ab864f9431ebc44a3c51fc Mon Sep 17 00:00:00 2001 From: John McCall Date: Tue, 17 Nov 2009 02:14:36 +0000 Subject: 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. llvm-svn: 89027 --- clang/lib/Sema/SemaAttr.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'clang/lib/Sema/SemaAttr.cpp') diff --git a/clang/lib/Sema/SemaAttr.cpp b/clang/lib/Sema/SemaAttr.cpp index 0a5335a2be0..e2eb87f25ea 100644 --- a/clang/lib/Sema/SemaAttr.cpp +++ b/clang/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); -- cgit v1.2.3