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

Method returnsReference

lib/symboldatabase.cpp:3377–3382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3375}
3376
3377bool Function::returnsReference(const Function* function, bool unknown, bool includeRValueRef)
3378{
3379 return checkReturns(function, unknown, false, [includeRValueRef](const Token* /*defStart*/, const Token* defEnd) {
3380 return includeRValueRef ? Token::Match(defEnd->previous(), "&|&&") : Token::simpleMatch(defEnd->previous(), "&");
3381 });
3382}
3383
3384bool Function::returnsPointer(const Function* function, bool unknown)
3385{

Callers

nothing calls this directly

Calls 2

checkReturnsFunction · 0.85
simpleMatchFunction · 0.70

Tested by

no test coverage detected