diff options
author | John McCall <rjmccall@apple.com> | 2009-10-09 21:13:30 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-10-09 21:13:30 +0000 |
commit | f36e02d4aff98bf2e52e342e0038d4172fbb5e64 (patch) | |
tree | de0e84cc5c69c3749a01794221565dcbe5d22614 /lib/Sema/SemaAttr.cpp | |
parent | d7e5bdb23c6ba2786cf94788c9af555e2c1276ce (diff) |
Refactor the LookupResult API to simplify most common operations. Require users to
pass a LookupResult reference to lookup routines. Call out uses which assume a single
result.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83674 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAttr.cpp')
-rw-r--r-- | lib/Sema/SemaAttr.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp index 702e120f9c..0a5335a2be 100644 --- a/lib/Sema/SemaAttr.cpp +++ b/lib/Sema/SemaAttr.cpp @@ -179,13 +179,12 @@ void Sema::ActOnPragmaUnused(const Token *Identifiers, unsigned NumIdentifiers, for (unsigned i = 0; i < NumIdentifiers; ++i) { const Token &Tok = Identifiers[i]; IdentifierInfo *Name = Tok.getIdentifierInfo(); - const LookupResult &Lookup = LookupParsedName(curScope, NULL, Name, - LookupOrdinaryName, - false, true, - Tok.getLocation()); + LookupResult Lookup; + LookupParsedName(Lookup, curScope, NULL, Name,LookupOrdinaryName, + false, true, Tok.getLocation()); // FIXME: Handle Lookup.isAmbiguous? - NamedDecl *ND = Lookup.getAsDecl(); + NamedDecl *ND = Lookup.getAsSingleDecl(Context); if (!ND) { Diag(PragmaLoc, diag::warn_pragma_unused_undeclared_var) |