forked from OSchip/llvm-project
Don't suggest namespaces if the next token is a '.'
llvm-svn: 191589
This commit is contained in:
parent
c7cda27f79
commit
30943ce6fd
|
@ -132,6 +132,9 @@ public:
|
|||
return isa<ObjCIvarDecl>(FD);
|
||||
if (NextToken.is(tok::equal))
|
||||
return candidate.getCorrectionDeclAs<VarDecl>();
|
||||
if (NextToken.is(tok::period) &&
|
||||
candidate.getCorrectionDeclAs<NamespaceDecl>())
|
||||
return false;
|
||||
return CorrectionCandidateCallback::ValidateCandidate(candidate);
|
||||
}
|
||||
|
||||
|
|
|
@ -128,3 +128,10 @@ long readline(const char *, char *, unsigned long);
|
|||
void assign_to_unknown_var() {
|
||||
deadline_ = 1; // expected-error-re {{use of undeclared identifier 'deadline_'$}}
|
||||
}
|
||||
|
||||
namespace no_ns_before_dot {
|
||||
namespace re2 {}
|
||||
void test() {
|
||||
req.set_check(false); // expected-error-re {{use of undeclared identifier 'req'$}}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue