Fix 10364: Performance regression (#3340)
This commit is contained in:
parent
59a1c1a9d8
commit
0b079937e0
|
@ -422,7 +422,7 @@ struct ForwardTraversal {
|
|||
return Break(Analyzer::Terminate::Bail);
|
||||
if (allAnalysis.isIncremental())
|
||||
return Break(Analyzer::Terminate::Bail);
|
||||
} else {
|
||||
} else if (allAnalysis.isModified()) {
|
||||
std::vector<ForwardTraversal> ftv = tryForkScope(endBlock, allAnalysis.isModified());
|
||||
bool forkContinue = true;
|
||||
for (ForwardTraversal& ft : ftv) {
|
||||
|
@ -448,6 +448,11 @@ struct ForwardTraversal {
|
|||
}
|
||||
if (allAnalysis.isIncremental())
|
||||
return Break(Analyzer::Terminate::Bail);
|
||||
} else {
|
||||
if (updateInnerLoop(endBlock, stepTok, condTok) == Progress::Break)
|
||||
return Progress::Break;
|
||||
if (allAnalysis.isIncremental())
|
||||
return Break(Analyzer::Terminate::Bail);
|
||||
}
|
||||
return Progress::Continue;
|
||||
}
|
||||
|
|
|
@ -5715,6 +5715,29 @@ private:
|
|||
" } while (b < 1);\n"
|
||||
"}\n";
|
||||
valueOfTok(code, "b");
|
||||
|
||||
code = "void ParseEvent(tinyxml2::XMLDocument& doc, std::set<Item*>& retItems) {\n"
|
||||
" auto ParseAddItem = [&](Item* item) {\n"
|
||||
" return retItems.insert(item).second;\n"
|
||||
" };\n"
|
||||
" tinyxml2::XMLElement *root = doc.RootElement();\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
" for (auto *el = root->FirstChildElement(\"Result\"); el && !ParseAddItem(GetItem(el)); el = el->NextSiblingElement(\"Result\")) ;\n"
|
||||
"}\n";
|
||||
valueOfTok(code, "root");
|
||||
}
|
||||
|
||||
void valueFlowCrashConstructorInitialization() { // #9577
|
||||
|
|
Loading…
Reference in New Issue