Fix a typo suggestion regression introduced by r191544.

llvm-svn: 191798
This commit is contained in:
Kaelyn Uhrain 2013-10-01 22:00:28 +00:00
parent 5fa40c3b9e
commit 07e627263f
2 changed files with 8 additions and 1 deletions

View File

@ -129,7 +129,7 @@ public:
virtual bool ValidateCandidate(const TypoCorrection &candidate) {
if (FieldDecl *FD = candidate.getCorrectionDeclAs<FieldDecl>())
return isa<ObjCIvarDecl>(FD);
return !candidate.getCorrectionSpecifier() || isa<ObjCIvarDecl>(FD);
if (NextToken.is(tok::equal))
return candidate.getCorrectionDeclAs<VarDecl>();
if (NextToken.is(tok::period) &&

View File

@ -144,3 +144,10 @@ namespace PR17394 {
class B : private A {};
B zzzzzzzzzy<>; // expected-error {{expected ';' after top level declarator}}{}
}
namespace correct_fields_in_member_funcs {
struct S {
int my_member; // expected-note {{'my_member' declared here}}
void f() { my_menber = 1; } // expected-error {{use of undeclared identifier 'my_menber'; did you mean 'my_member'?}}
};
}