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

Method getErrorMessages

lib/checkcondition.cpp:2118–2142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2116}
2117
2118void CheckCondition::getErrorMessages(ErrorLogger& errorLogger, const Settings &settings) const
2119{
2120 CheckConditionImpl c(nullptr, settings, errorLogger);
2121
2122 c.assignIfError(nullptr, nullptr, "", false);
2123 c.badBitmaskCheckError(nullptr);
2124 c.comparisonError(nullptr, "&", 6, "==", 1, false);
2125 c.duplicateConditionError(nullptr, nullptr, ErrorPath{});
2126 c.overlappingElseIfConditionError(nullptr, 1);
2127 c.overlappingInnerConditionError(nullptr, nullptr, ErrorPath());
2128 c.mismatchingBitAndError(nullptr, 0xf0, nullptr, 1);
2129 c.oppositeInnerConditionError(nullptr, nullptr, ErrorPath{});
2130 c.identicalInnerConditionError(nullptr, nullptr, ErrorPath{});
2131 c.identicalConditionAfterEarlyExitError(nullptr, nullptr, ErrorPath{});
2132 c.incorrectLogicOperatorError(nullptr, "foo > 3 && foo < 4", true, false, ErrorPath{});
2133 c.redundantConditionError(nullptr, "If x > 11 the condition x > 10 is always true.", false);
2134 c.moduloAlwaysTrueFalseError(nullptr, "1");
2135 c.clarifyConditionError(nullptr, true, false);
2136 c.alwaysTrueFalseError(nullptr, nullptr, nullptr);
2137 c.invalidTestForOverflow(nullptr, nullptr, "false");
2138 c.pointerAdditionResultNotNullError(nullptr, nullptr);
2139 c.duplicateConditionalAssignError(nullptr, nullptr);
2140 c.assignmentInCondition(nullptr);
2141 c.compareValueOutOfTypeRangeError(nullptr, "unsigned char", 256, true);
2142}

Callers

nothing calls this directly

Tested by

no test coverage detected