MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / isImplicitlyVirtual

Method isImplicitlyVirtual

lib/symboldatabase.cpp:4832–4844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4830}
4831
4832bool Function::isImplicitlyVirtual(bool defaultVal, bool* pFoundAllBaseClasses) const
4833{
4834 if (hasVirtualSpecifier() || hasOverrideSpecifier() || hasFinalSpecifier())
4835 return true;
4836 bool foundAllBaseClasses = true;
4837 if (getOverriddenFunction(&foundAllBaseClasses)) //If it overrides a base class's method then it's virtual
4838 return true;
4839 if (pFoundAllBaseClasses)
4840 *pFoundAllBaseClasses = foundAllBaseClasses;
4841 if (foundAllBaseClasses) //If we've seen all the base classes and none of the above were true then it must not be virtual
4842 return false;
4843 return defaultVal; //If we can't see all the bases classes then we can't say conclusively
4844}
4845
4846std::vector<const Function*> Function::getOverloadedFunctions() const
4847{

Callers 15

printXmlMethod · 0.45
findFunctionMethod · 0.45
valueFlowFunctionReturnFunction · 0.45
parseTokensMethod · 0.45
checkPassByReferenceMethod · 0.45
checkConstVariableMethod · 0.45
checkConstPointerMethod · 0.45
executeImplMethod · 0.45
privateFunctionsMethod · 0.45
checkConstMethod · 0.45

Calls 3

hasVirtualSpecifierFunction · 0.85
hasOverrideSpecifierFunction · 0.85
hasFinalSpecifierFunction · 0.85

Tested by

no test coverage detected