definitions to also include tag declarations. Fixes PR8151.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131102
91177308-0d34-0410-b5e6-
96231b3b80d8
// shouldn't be diagnosing.
LookupName(Previous, S);
- if (Previous.isAmbiguous() && TUK == TUK_Definition) {
+ if (Previous.isAmbiguous() &&
+ (TUK == TUK_Definition || TUK == TUK_Declaration)) {
LookupResult::Filter F = Previous.makeFilter();
while (F.hasNext()) {
NamedDecl *ND = F.next();
F.erase();
}
F.done();
-
- if (Previous.isAmbiguous())
- return 0;
}
// Note: there used to be some attempt at recovery here.
struct Point { };
virtual bool testMethod (Test::Point& p) = 0;
};
+
+// PR8151
+namespace A { struct Face {}; }
+namespace B { struct Face {}; }
+using namespace A;
+using namespace B;
+
+class C {
+ struct Face;
+ Face *mFaces;
+};