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/SemaDeclAttr.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/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index a23da41086..23c83175eb 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -1104,8 +1104,9 @@ static void HandleCleanupAttr(Decl *d, const AttributeList &Attr, Sema &S) { } // Look up the function - NamedDecl *CleanupDecl = S.LookupName(S.TUScope, Attr.getParameterName(), - Sema::LookupOrdinaryName); + NamedDecl *CleanupDecl + = S.LookupSingleName(S.TUScope, Attr.getParameterName(), + Sema::LookupOrdinaryName); if (!CleanupDecl) { S.Diag(Attr.getLoc(), diag::err_attribute_cleanup_arg_not_found) << Attr.getParameterName(); |