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

Function isLikelyStream

lib/astutils.cpp:3335–3350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3333}
3334
3335bool isLikelyStream(const Token *stream)
3336{
3337 if (!stream)
3338 return false;
3339
3340 if (!stream->isCpp())
3341 return false;
3342
3343 if (!Token::Match(stream->astParent(), "&|<<|>>") || !stream->astParent()->isBinaryOp())
3344 return false;
3345
3346 if (stream->astParent()->astOperand1() != stream)
3347 return false;
3348
3349 return !astIsIntegral(stream, false);
3350}
3351
3352bool isLikelyStreamRead(const Token *op)
3353{

Callers 4

analyzeConditionFunction · 0.85
isConstStatementFunction · 0.85
isTemporaryFunction · 0.85
isVariableChangedFunction · 0.85

Calls 4

astIsIntegralFunction · 0.85
astParentMethod · 0.80
isBinaryOpMethod · 0.80
astOperand1Method · 0.80

Tested by

no test coverage detected