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

Function conditionString

lib/checkcondition.cpp:1119–1130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1117}
1118
1119static std::string conditionString(bool not1, const Token *expr1, const std::string &op, const std::string &value1)
1120{
1121 if (expr1->astParent()->isComparisonOp())
1122 return std::string(not1 ? "!(" : "") + expr1->expressionString() +
1123 " " +
1124 op +
1125 " " +
1126 value1 +
1127 (not1 ? ")" : "");
1128
1129 return std::string(not1 ? "!" : "") + expr1->expressionString();
1130}
1131
1132static std::string conditionString(const Token * tok)
1133{

Callers 1

Calls 6

parseComparisonFunction · 0.85
astParentMethod · 0.80
astOperand2Method · 0.80
astOperand1Method · 0.80
expressionStringMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected