зеркало из https://github.com/microsoft/clang.git
Fix infinite loop during error diagnostics. Fixes rdar://8875304.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124243 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
98650449dc
Коммит
df8dc5d772
|
@ -3814,7 +3814,7 @@ Sema::LookupMemberExpr(LookupResult &R, Expr *&BaseExpr,
|
||||||
// - 'type' is an Objective C type
|
// - 'type' is an Objective C type
|
||||||
// - 'bar' is a pseudo-destructor name which happens to refer to
|
// - 'bar' is a pseudo-destructor name which happens to refer to
|
||||||
// the appropriate pointer type
|
// the appropriate pointer type
|
||||||
} else if (Ptr->getPointeeType()->isRecordType() &&
|
} else if (!IsArrow && Ptr->getPointeeType()->isRecordType() &&
|
||||||
MemberName.getNameKind() != DeclarationName::CXXDestructorName) {
|
MemberName.getNameKind() != DeclarationName::CXXDestructorName) {
|
||||||
Diag(OpLoc, diag::err_typecheck_member_reference_suggestion)
|
Diag(OpLoc, diag::err_typecheck_member_reference_suggestion)
|
||||||
<< BaseType << int(IsArrow) << BaseExpr->getSourceRange()
|
<< BaseType << int(IsArrow) << BaseExpr->getSourceRange()
|
||||||
|
|
|
@ -23,3 +23,16 @@ void f(C &c, D& d, E& e) {
|
||||||
d->f();
|
d->f();
|
||||||
e->f(); // expected-error{{incomplete definition of type}}
|
e->f(); // expected-error{{incomplete definition of type}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// rdar://8875304
|
||||||
|
namespace rdar8875304 {
|
||||||
|
class Point {};
|
||||||
|
class Line_Segment{ public: Line_Segment(const Point&){} };
|
||||||
|
class Node { public: Point Location(){ Point p; return p; } };
|
||||||
|
|
||||||
|
void f()
|
||||||
|
{
|
||||||
|
Node** node1;
|
||||||
|
Line_Segment(node1->Location()); // expected-error {{not a structure or union}}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче