Fixed #5622 (Allow class methods to be referenced in library XML configuration files)

This commit is contained in:
Daniel Marjamäki 2015-08-10 18:51:51 +02:00
parent a70c57daa2
commit 57aec12f34
1 changed files with 2 additions and 2 deletions

View File

@ -248,8 +248,8 @@ void CheckLeakAutoVar::checkScope(const Token * const startToken,
continue;
// allocation?
if (Token::Match(tok->tokAt(2), "%type% (")) {
int i = _settings->library.alloc(tok->tokAt(2));
if (tok->next()->astOperand2() && Token::Match(tok->next()->astOperand2()->previous(), "%type% (")) {
int i = _settings->library.alloc(tok->next()->astOperand2()->previous());
if (i > 0) {
alloctype[tok->varId()].type = i;
alloctype[tok->varId()].status = VarInfo::ALLOC;