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

Function findTokenSkipDeadCode

lib/findtoken.h:149–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147
148
149template<class T, class Predicate, class Evaluate, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
150T* findTokenSkipDeadCode(const Library& library, T* start, const Token* end, const Predicate& pred, const Evaluate& evaluate)
151{
152 T* result = nullptr;
153 (void)internal::findTokensSkipDeadCodeImpl(
154 library,
155 start,
156 end,
157 pred,
158 [&](T* tok) {
159 result = tok;
160 return true;
161 },
162 evaluate,
163 false);
164 return result;
165}
166
167template<class T, class Predicate, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
168T* findTokenSkipDeadCode(const Library& library, T* start, const Token* end, const Predicate& pred)

Callers 1

operator()Method · 0.85

Calls 1

Tested by

no test coverage detected