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

Function enumContainsEnumerator

plugins/qmljs/duchain/declarationbuilder.cpp:1456–1463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1454}
1455
1456static bool enumContainsEnumerator(const AbstractType::Ptr& a, const AbstractType::Ptr& b)
1457{
1458 Q_ASSERT(a->whichType() == AbstractType::TypeEnumeration);
1459 auto aEnum = a.staticCast<EnumerationType>();
1460 Q_ASSERT(b->whichType() == AbstractType::TypeEnumerator);
1461 auto bEnumerator = b.staticCast<EnumeratorType>();
1462 return bEnumerator->qualifiedIdentifier().beginsWith(aEnum->qualifiedIdentifier());
1463}
1464
1465static bool isNumeric(const IntegralType::Ptr& type)
1466{

Callers 1

areTypesEqualMethod · 0.85

Calls 3

beginsWithMethod · 0.80
whichTypeMethod · 0.45
qualifiedIdentifierMethod · 0.45

Tested by

no test coverage detected