From 87ebeb3f650768b8f11aba0cb412dfe1db4d69a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 7 Mar 2015 09:43:56 +0100 Subject: [PATCH] Fixed #6533 (library: alloc/dealloc doesn't work when function declaration is seen) --- lib/library.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/library.h b/lib/library.h index 78aa64079..25245d823 100644 --- a/lib/library.h +++ b/lib/library.h @@ -71,12 +71,12 @@ public: /** get allocation id for function */ int alloc(const Token *tok) const { - return tok->function() ? 0 : getid(_alloc, tok->str()); + return isNotLibraryFunction(tok) && argumentChecks.find(tok->str()) != argumentChecks.end() ? 0 : getid(_alloc, tok->str()); } /** get deallocation id for function */ int dealloc(const Token *tok) const { - return tok->function() ? 0 : getid(_dealloc, tok->str()); + return isNotLibraryFunction(tok) && argumentChecks.find(tok->str()) != argumentChecks.end() ? 0 : getid(_dealloc, tok->str()); } /** get deallocation id for function by name */