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

Function isFunctionOrBreakPattern

lib/checkother.cpp:790–793  ·  view source on GitHub ↗

--------------------------------------------------------------------------- switch (x) { case 2: y = a; // <- this assignment is redundant case 3: y = b; // <- case 2 falls through and sets y twice } ---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

788// }
789//---------------------------------------------------------------------------
790static inline bool isFunctionOrBreakPattern(const Token *tok)
791{
792 return Token::Match(tok, "%name% (") || Token::Match(tok, "break|continue|return|exit|goto|throw");
793}
794
795void CheckOtherImpl::redundantBitwiseOperationInSwitchError()
796{

Calls

no outgoing calls

Tested by

no test coverage detected