aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Sema/SemaDecl.cpp3
-rw-r--r--test/SemaCXX/member-name-lookup.cpp3
-rw-r--r--test/SemaCXX/using-directive.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 39747b63ee..66b72ecad4 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2829,7 +2829,8 @@ Sema::DeclTy *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagKind TK,
// FIXME: We're looking into outer scopes here, even when we
// shouldn't be. Doing so can result in ambiguities that we
// shouldn't be diagnosing.
- LookupResult R = LookupName(S, Name, LookupTagName);
+ LookupResult R = LookupName(S, Name, LookupTagName,
+ /*RedeclarationOnly=*/(TK != TK_Reference));
if (R.isAmbiguous()) {
DiagnoseAmbiguousLookup(R, Name, NameLoc);
// FIXME: This is not best way to recover from case like:
diff --git a/test/SemaCXX/member-name-lookup.cpp b/test/SemaCXX/member-name-lookup.cpp
index a19161203e..f48a99add4 100644
--- a/test/SemaCXX/member-name-lookup.cpp
+++ b/test/SemaCXX/member-name-lookup.cpp
@@ -141,6 +141,5 @@ struct HasMemberType2 {
};
struct HasAnotherMemberType : HasMemberType1, HasMemberType2 {
- // FIXME: this is well-formed, but we diagnose an ambiguity here
- // struct type { };
+ struct type { };
};
diff --git a/test/SemaCXX/using-directive.cpp b/test/SemaCXX/using-directive.cpp
index f00209863d..baf5d58126 100644
--- a/test/SemaCXX/using-directive.cpp
+++ b/test/SemaCXX/using-directive.cpp
@@ -69,6 +69,6 @@ class X {
namespace N {
// FIXME: both of these should work, but they currently cause an ambiguity.
- // struct K2;
- // struct K2 { };
+ struct K2;
+ struct K2 { };
}