reportError(tok, Severity::error, "strPlusChar", "Unusual pointer arithmetic. A value of type '" + charType +"' is added to a string literal.", CWE665, Certainty::normal);
}
staticboolisMacroUsage(const Token* tok)
{
if (const Token* parent = tok->astParent()) {
while (parent && (parent->isCast() || parent->str() == "&&")) {
if (parent->isExpandedMacro())
returntrue;
parent = parent->astParent();
}
if (!parent)
returnfalse;
if (parent->isExpandedMacro())
returntrue;
if (parent->isUnaryOp("!") || parent->isComparisonOp()) {