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

Method isPacked

lib/tokenize.cpp:11282–11289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11280}
11281
11282bool Tokenizer::isPacked(const Token * bodyStart) const
11283{
11284 const auto& directives = mDirectives;
11285 // TODO: should this return true if the #pragma exists in any line before the start token?
11286 return std::any_of(directives.cbegin(), directives.cend(), [&](const Directive& d) {
11287 return d.linenr < bodyStart->linenr() && d.str == "#pragma pack(1)" && d.file == list.getFiles().front();
11288 });
11289}
11290
11291void Tokenizer::getErrorMessages(ErrorLogger& errorLogger, const Settings& settings)
11292{

Callers 1

Calls 1

frontMethod · 0.80

Tested by

no test coverage detected