summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaAttr.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-10-09 21:13:30 +0000
committerJohn McCall <rjmccall@apple.com>2009-10-09 21:13:30 +0000
commit9f3059a192ca29fd460df71ddbedc69242b88e61 (patch)
tree73a4e8c69448166b3ab79de7629a03c9c50be01c /clang/lib/Sema/SemaAttr.cpp
parenta2b99107c4279caa88de2ecc3a458a9a88bc7c0c (diff)
downloadbcm5719-llvm-9f3059a192ca29fd460df71ddbedc69242b88e61.tar.gz
bcm5719-llvm-9f3059a192ca29fd460df71ddbedc69242b88e61.zip
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. llvm-svn: 83674
Diffstat (limited to 'clang/lib/Sema/SemaAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaAttr.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaAttr.cpp b/clang/lib/Sema/SemaAttr.cpp
index 702e120f9c9..0a5335a2be0 100644
--- a/clang/lib/Sema/SemaAttr.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud