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

Function parseUnions

lib/checkother.cpp:4550–4567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4548}
4549
4550static std::vector<Union> parseUnions(const SymbolDatabase &symbolDatabase,
4551 const Settings &settings)
4552{
4553 std::vector<Union> unions;
4554
4555 for (const Scope &scope : symbolDatabase.scopeList) {
4556 if (scope.type != ScopeType::eUnion)
4557 continue;
4558
4559 Union u(scope);
4560 for (const Variable &var : scope.varlist) {
4561 u.members.push_back(parseUnionMember(var, settings));
4562 }
4563 unions.push_back(std::move(u));
4564 }
4565
4566 return unions;
4567}
4568
4569static bool isZeroInitializer(const Token *tok)
4570{

Callers 1

checkUnionZeroInitMethod · 0.85

Calls 2

parseUnionMemberFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected