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

Function findTokensSkipDeadAndUnevaluatedCode

lib/findtoken.h:120–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120template<class T, class Predicate, class Evaluate, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
121std::vector<T*> findTokensSkipDeadAndUnevaluatedCode(const Library& library,
122 T* start,
123 const Token* end,
124 const Predicate& pred,
125 const Evaluate& evaluate)
126{
127 std::vector<T*> result;
128 (void)internal::findTokensSkipDeadCodeImpl(
129 library,
130 start,
131 end,
132 pred,
133 [&](T* tok) {
134 result.push_back(tok);
135 return false;
136 },
137 evaluate,
138 true);
139 return result;
140}
141
142template<class T, class Predicate, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
143std::vector<T*> findTokensSkipDeadAndUnevaluatedCode(const Library& library, T* start, const Token* end, const Predicate& pred)

Callers 1

Calls 2

push_backMethod · 0.45

Tested by

no test coverage detected