Class: better check if there are friends. ticket: #2459
This commit is contained in:
parent
f947955c63
commit
1e25d74ba4
|
@ -583,11 +583,6 @@ void CheckClass::privateFunctions()
|
|||
if (Token::findmatch(_tokenizer->tokens(), "; __property ;"))
|
||||
return;
|
||||
|
||||
// skip checking if there are friends
|
||||
// Todo: check if each class has friends
|
||||
if (Token::findmatch(_tokenizer->tokens(), "friend"))
|
||||
return;
|
||||
|
||||
// #2407 calls from operator() is not detected
|
||||
// TODO: Don't bailout. Detect the call.
|
||||
if (Token::findmatch(_tokenizer->tokens(), "operator ( )"))
|
||||
|
@ -609,6 +604,10 @@ void CheckClass::privateFunctions()
|
|||
if (!scope->derivedFrom.empty())
|
||||
continue;
|
||||
|
||||
// skip checking if there are friends
|
||||
if (!scope->friendList.empty())
|
||||
continue;
|
||||
|
||||
// Locate some class
|
||||
const Token *tok1 = scope->classDef;
|
||||
|
||||
|
|
Loading…
Reference in New Issue