Refactorization: Removed code for copying attributes from function declaration to implementation in symboldatabase as it is neither tested nor necessary

This commit is contained in:
PKEuS 2015-01-09 19:45:45 +01:00
parent 6998c55680
commit 4d5bf28b33
1 changed files with 0 additions and 10 deletions

View File

@ -1563,16 +1563,6 @@ Function* SymbolDatabase::addGlobalFunction(Scope*& scope, const Token*& tok, co
for (std::multimap<std::string, const Function *>::iterator i = scope->functionMap.find(tok->str()); i != scope->functionMap.end() && i->first == tok->str(); ++i) {
if (Function::argsMatch(scope, i->second->argDef->next(), argStart->next(), "", 0)) {
function = const_cast<Function *>(i->second);
// copy attributes from function prototype to function
Token* to = const_cast<Token *>(tok);
const Token* from = function->tokenDef;
to->isAttributeConstructor(from->isAttributeConstructor());
to->isAttributeDestructor(from->isAttributeDestructor());
to->isAttributePure(from->isAttributePure());
to->isAttributeConst(from->isAttributeConst());
to->isAttributeNoreturn(from->isAttributeNoreturn());
to->isAttributeNothrow(from->isAttributeNothrow());
to->isDeclspecNothrow(from->isDeclspecNothrow());
break;
}
}