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

Function cfg

lib/preprocessor.cpp:539–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537}
538
539static std::string cfg(const std::vector<std::string> &configs, const std::string &userDefines)
540{
541 std::set<std::string> configs2(configs.cbegin(), configs.cend());
542 std::string ret;
543 for (const std::string &c : configs2) {
544 if (c.empty())
545 continue;
546 if (c == "0")
547 return "";
548 if (hasDefine(userDefines, c))
549 continue;
550 if (!ret.empty())
551 ret += ';';
552 ret += c;
553 }
554 return ret;
555}
556
557static bool isUndefined(const std::string &cfgStr, const std::set<std::string> &undefined)
558{

Callers 1

getConfigsFunction · 0.85

Calls 2

hasDefineFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected