SymbolDatabase::isFunction: better handling of return types
This commit is contained in:
parent
45c4456c24
commit
7015fb097e
|
@ -1393,7 +1393,7 @@ bool SymbolDatabase::isFunction(const Token *tok, const Scope* outerScope, const
|
|||
// done if constructor or destructor
|
||||
if (!Token::Match(tok1, "{|}|;|public:|protected:|private:") && tok1) {
|
||||
// skip over pointers and references
|
||||
while (Token::Match(tok1, "[*&]"))
|
||||
while (Token::Match(tok1, "%type%|*|&") && !endsWith(tok1->str(), ':') && (!isReservedName(tok1->str()) || tok1->str() == "const"))
|
||||
tok1 = tok1->previous();
|
||||
|
||||
// skip over template
|
||||
|
|
|
@ -3774,7 +3774,7 @@ private:
|
|||
ASSERT(db != nullptr);
|
||||
ASSERT(db && !db->isFunction(Token::findsimplematch(tokenizer.tokens(), "PTRRELOC ( &"), &db->scopeList.back(), nullptr, nullptr, nullptr));
|
||||
ASSERT(db->findScopeByName("set_cur_cpu_spec") != nullptr);
|
||||
// TODO: ASSERT(db->findScopeByName("setup_cpu_spec") != nullptr);
|
||||
ASSERT(db->findScopeByName("setup_cpu_spec") != nullptr);
|
||||
ASSERT(db->findScopeByName("PTRRELOC") == nullptr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue