From 3babf6a9eb8f85fc2a306ae14fa0b83fed9239ab Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Sun, 13 Mar 2011 22:59:25 -0400 Subject: [PATCH] look for function prototypes but don't save them in the symbol database yet --- lib/symboldatabase.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 33ab2af97..a7edd4e41 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -438,6 +438,23 @@ SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *setti tok = tok1; } + + // function prototype + else if (Token::simpleMatch(argStart->link(), ") ;")) + { + /** @todo save function prototypes in database someday */ + tok = argStart->link()->next(); + continue; + } + + // function returning function pointer prototype + else if (Token::simpleMatch(argStart->link(), ") ) (") && + Token::simpleMatch(argStart->link()->tokAt(2)->link(), ") ;")) + { + /** @todo save function prototypes in database someday */ + tok = argStart->link()->tokAt(2)->link()->next(); + continue; + } } } else if (scope->type == Scope::eFunction || scope->isLocal())