Commit ba7f235b authored by Milian Wolff's avatar Milian Wolff

Reinstantiate code from 3c51faa2

Fixes test_duchain-clang's testSameFunctionDefinition. My git foo
isn't good enough to figure out where this got lost?
parent c7b8e797
......@@ -89,6 +89,10 @@ FunctionDefinition* FunctionDefinition::definition(const Declaration* decl)
return nullptr;
}
if (decl->isFunctionDeclaration() && decl->isDefinition()) {
return const_cast<FunctionDefinition *>(static_cast<const FunctionDefinition *>(decl));
}
const KDevVarLengthArray<IndexedDeclaration> allDefinitions = DUChain::definitions()->definitions(decl->id());
for (const IndexedDeclaration decl : allDefinitions) {
if (decl.data()) ///@todo Find better ways of deciding which definition to use
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment