parent
39c5274742
commit
fbf63b932e
|
@ -329,20 +329,17 @@ static CppcheckLibraryData::Markup loadMarkup(QXmlStreamReader &xmlReader)
|
|||
QXmlStreamReader::TokenType type;
|
||||
if (xmlReader.attributes().hasAttribute("ext")) {
|
||||
markup.ext = xmlReader.attributes().value("ext").toString();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
mandatoryAttibuteMissing(xmlReader, "ext");
|
||||
}
|
||||
if (xmlReader.attributes().hasAttribute("aftercode")) {
|
||||
markup.afterCode = (xmlReader.attributes().value("aftercode") == "true") ? true : false;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
mandatoryAttibuteMissing(xmlReader, "aftercode");
|
||||
}
|
||||
if (xmlReader.attributes().hasAttribute("reporterrors")) {
|
||||
markup.reportErrors = (xmlReader.attributes().value("reporterrors") == "true") ? true : false;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
mandatoryAttibuteMissing(xmlReader, "reporterrors");
|
||||
}
|
||||
|
||||
|
@ -358,8 +355,7 @@ static CppcheckLibraryData::Markup loadMarkup(QXmlStreamReader &xmlReader)
|
|||
continue;
|
||||
if (xmlReader.name().toString() == "keyword") {
|
||||
markup.keywords.append(xmlReader.attributes().value("name").toString());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
unhandledElement(xmlReader);
|
||||
}
|
||||
}
|
||||
|
@ -372,13 +368,11 @@ static CppcheckLibraryData::Markup loadMarkup(QXmlStreamReader &xmlReader)
|
|||
continue;
|
||||
if (xmlReader.name().toString() == "block") {
|
||||
codeBlock.blocks.append(xmlReader.attributes().value("name").toString());
|
||||
}
|
||||
else if (xmlReader.name().toString() == "structure") {
|
||||
} else if (xmlReader.name().toString() == "structure") {
|
||||
codeBlock.offset = xmlReader.attributes().value("offset").toInt();
|
||||
codeBlock.start = xmlReader.attributes().value("start").toString();
|
||||
codeBlock.end = xmlReader.attributes().value("end").toString();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
unhandledElement(xmlReader);
|
||||
}
|
||||
}
|
||||
|
@ -392,14 +386,11 @@ static CppcheckLibraryData::Markup loadMarkup(QXmlStreamReader &xmlReader)
|
|||
continue;
|
||||
if (xmlReader.name().toString() == "exporter") {
|
||||
exporter.prefix = xmlReader.attributes().value("prefix").toString();
|
||||
}
|
||||
else if (xmlReader.name().toString() == "prefix") {
|
||||
} else if (xmlReader.name().toString() == "prefix") {
|
||||
exporter.prefixList.append(xmlReader.readElementText());
|
||||
}
|
||||
else if (xmlReader.name().toString() == "suffix") {
|
||||
} else if (xmlReader.name().toString() == "suffix") {
|
||||
exporter.suffixList.append(xmlReader.readElementText());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
unhandledElement(xmlReader);
|
||||
}
|
||||
}
|
||||
|
@ -411,8 +402,7 @@ static CppcheckLibraryData::Markup loadMarkup(QXmlStreamReader &xmlReader)
|
|||
continue;
|
||||
if (xmlReader.name().toString() == "importer") {
|
||||
markup.importer.append(xmlReader.readElementText());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
unhandledElement(xmlReader);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -755,8 +755,7 @@ static void followVariableExpressionError(const Token *tok1, const Token *tok2,
|
|||
std::vector<ReferenceToken> followAllReferences(const Token* tok, bool inconclusive, ErrorPath errors, int depth)
|
||||
{
|
||||
struct ReferenceTokenLess {
|
||||
bool operator()(const ReferenceToken& x, const ReferenceToken& y) const
|
||||
{
|
||||
bool operator()(const ReferenceToken& x, const ReferenceToken& y) const {
|
||||
return x.token < y.token;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -2845,7 +2845,9 @@ Check::FileInfo *CheckClass::getFileInfo(const Tokenizer *tokenizer, const Setti
|
|||
// the full definition must be compared
|
||||
bool fullDefinition = std::all_of(classScope->functionList.begin(),
|
||||
classScope->functionList.end(),
|
||||
[](const Function& f) { return f.hasBody(); });
|
||||
[](const Function& f) {
|
||||
return f.hasBody();
|
||||
});
|
||||
if (!fullDefinition)
|
||||
continue;
|
||||
|
||||
|
|
|
@ -584,7 +584,6 @@ void execute(const Token *expr,
|
|||
*result = 0;
|
||||
else
|
||||
*error = true;
|
||||
}
|
||||
else
|
||||
} else
|
||||
*error = true;
|
||||
}
|
||||
|
|
|
@ -2001,8 +2001,7 @@ struct ValueFlowAnalyzer : Analyzer {
|
|||
return isModified(tok);
|
||||
}
|
||||
|
||||
Action analyzeToken(const Token* ref, const Token* tok, Direction d, bool inconclusiveRef) const
|
||||
{
|
||||
Action analyzeToken(const Token* ref, const Token* tok, Direction d, bool inconclusiveRef) const {
|
||||
if (!ref)
|
||||
return Action::None;
|
||||
// If its an inconclusiveRef then ref != tok
|
||||
|
|
Loading…
Reference in New Issue