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

Function HasOverload

InsightsHelpers.cpp:925–941  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

923//-----------------------------------------------------------------------------
924
925static bool HasOverload(const FunctionDecl* fd)
926{
927 auto* ncfd = const_cast<FunctionDecl*>(fd);
928
929 Sema& sema = GetGlobalCI().getSema();
930 LookupResult result{sema, ncfd->getDeclName(), {}, Sema::LookupOrdinaryName};
931
932 if(sema.LookupName(result, sema.getScopeForContext(ncfd->getDeclContext()))) {
933#if IS_CLANG_NEWER_THAN(20)
934 return LookupResultKind::FoundOverloaded == result.getResultKind();
935#else
936 return LookupResult::FoundOverloaded == result.getResultKind();
937#endif
938 }
939
940 return false;
941}
942//-----------------------------------------------------------------------------
943
944std::string GetSpecialMemberName(const ValueDecl* vd);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected