From 57aec12f3461782ff6edc7ecd961c57a87a1ab3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 10 Aug 2015 18:51:51 +0200 Subject: [PATCH] Fixed #5622 (Allow class methods to be referenced in library XML configuration files) --- lib/checkleakautovar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checkleakautovar.cpp b/lib/checkleakautovar.cpp index d591105f9..bc9b8f0b9 100644 --- a/lib/checkleakautovar.cpp +++ b/lib/checkleakautovar.cpp @@ -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;