forked from OSchip/llvm-project
Fix a typo suggestion regression introduced by r191544.
llvm-svn: 191798
This commit is contained in:
parent
5fa40c3b9e
commit
07e627263f
|
@ -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) &&
|
||||
|
|
|
@ -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'?}}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue