aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-11-10 03:01:53 +0000
committerJohn McCall <rjmccall@apple.com>2010-11-10 03:01:53 +0000
commitd7945c6bfd9e0cc7ed451e6c4acd8860f2d0eaba (patch)
tree44922e88e85116330f7307e09cc1fd2e94fca3e6 /lib/Sema/SemaOverload.cpp
parent78b810559d89e996e00684335407443936ce34a1 (diff)
Friend function declarations can overload with tag declarations.
Fixes PR7915. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 440f5acdbc..4c843ea738 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -584,10 +584,12 @@ Sema::CheckOverload(Scope *S, FunctionDecl *New, const LookupResult &Old,
Match = *I;
return Ovl_Match;
}
- } else if (isa<UsingDecl>(OldD) || isa<TagDecl>(OldD)) {
+ } else if (isa<UsingDecl>(OldD)) {
// We can overload with these, which can show up when doing
// redeclaration checks for UsingDecls.
assert(Old.getLookupKind() == LookupUsingDeclName);
+ } else if (isa<TagDecl>(OldD)) {
+ // We can always overload with tags by hiding them.
} else if (isa<UnresolvedUsingValueDecl>(OldD)) {
// Optimistically assume that an unresolved using decl will
// overload; if it doesn't, we'll have to diagnose during