MCPcopy Create free account
hub / github.com/KDE/kdevelop / setAbstractType

Method setAbstractType

kdevplatform/language/duchain/classfunctiondeclaration.cpp:30–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void ClassFunctionDeclaration::setAbstractType(AbstractType::Ptr type)
31{
32 ///TODO: write testcase for typealias case which used to trigger this warning:
33 /// typedef bool (*EventFilter)(void *message, long *result);
34 /// in e.g. qcoreapplication.h:172
35 if (type && !dynamic_cast<FunctionType*>(type.data()) && type->whichType() != AbstractType::TypeAlias) {
36 qCWarning(LANGUAGE) << "WARNING: Non-function type assigned to function declaration. Type is: "
37 << type->toString() << "whichType:" << type->whichType()
38 << "Declaration is:" << toString()
39 << topContext()->url().str() << range().castToSimpleRange();
40 }
41 ClassMemberDeclaration::setAbstractType(type);
42}
43
44DEFINE_LIST_MEMBER_HASH(ClassFunctionDeclarationData, m_defaultParameters, IndexedString)
45

Callers

nothing calls this directly

Calls 8

topContextFunction · 0.85
rangeFunction · 0.85
strMethod · 0.80
toStringFunction · 0.50
dataMethod · 0.45
whichTypeMethod · 0.45
toStringMethod · 0.45
urlMethod · 0.45

Tested by

no test coverage detected