MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / TypeContainsSubType

Function TypeContainsSubType

InsightsHelpers.h:203–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201
202template<typename QT, typename SUB_T>
203static bool TypeContainsSubType(const QualType& t)
204{
205 if(const auto* lref = dyn_cast_or_null<QT>(t.getTypePtrOrNull())) {
206 const auto subType = GetDesugarType(lref->getPointeeType());
207 const auto& ct = subType.getCanonicalType();
208 const auto* plainSubType = ct.getTypePtrOrNull();
209
210 return isa<SUB_T>(plainSubType);
211 }
212
213 return false;
214}
215//-----------------------------------------------------------------------------
216
217template<typename T, typename TFunc>

Callers

nothing calls this directly

Calls 1

GetDesugarTypeFunction · 0.85

Tested by

no test coverage detected