diff options
author | John McCall <rjmccall@apple.com> | 2010-04-23 21:37:18 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-04-23 21:37:18 +0000 |
commit | f88b0d6c99e6473e78331271935986535dc4603c (patch) | |
tree | 301a10c64fa9fd9309b4bdc4401b1555d46b945d /lib/Sema/SemaDecl.cpp | |
parent | 14b91628961ab50cc6e724bbcd408fdee100662d (diff) |
Transition the last acceptable-result filter kind in LookupResult over to use
a simple IDNS mask by introducing a namespace for non-member operators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102215 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index cc57bdd5f8..7d2d866828 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -3269,6 +3269,12 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, NewFD->setAccess(Access); } + if (NewFD->isOverloadedOperator() && !DC->isRecord() && + NewFD->isInIdentifierNamespace(Decl::IDNS_Ordinary)) { + NewFD->setNonMemberOperator(); + if (FunctionTemplate) FunctionTemplate->setNonMemberOperator(); + } + // If we have a function template, check the template parameter // list. This will check and merge default template arguments. if (FunctionTemplate) { |