Fix 10420: assertion error when analysing juce (#3413)
This commit is contained in:
parent
865163b2ba
commit
524db1c756
|
@ -3271,7 +3271,7 @@ static void valueFlowForwardLifetime(Token * tok, TokenList *tokenlist, ErrorLog
|
||||||
// Skip RHS
|
// Skip RHS
|
||||||
const Token *nextExpression = nextAfterAstRightmostLeaf(parent);
|
const Token *nextExpression = nextAfterAstRightmostLeaf(parent);
|
||||||
|
|
||||||
if (Token::Match(parent->astOperand1(), ".|[|(")) {
|
if (Token::Match(parent->astOperand1(), ".|[|(") && parent->astOperand1()->exprId() > 0) {
|
||||||
valueFlowForwardExpression(
|
valueFlowForwardExpression(
|
||||||
const_cast<Token*>(nextExpression), endOfVarScope, parent->astOperand1(), values, tokenlist, settings);
|
const_cast<Token*>(nextExpression), endOfVarScope, parent->astOperand1(), values, tokenlist, settings);
|
||||||
|
|
||||||
|
|
|
@ -5659,6 +5659,16 @@ private:
|
||||||
" };\n"
|
" };\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
valueOfTok(code, "0");
|
valueOfTok(code, "0");
|
||||||
|
|
||||||
|
code = "namespace juce {\n"
|
||||||
|
"PopupMenu::Item& PopupMenu::Item::operator= (Item&&) = default;\n"
|
||||||
|
"PopupMenu::Options withDeletionCheck (Component& comp) const {\n"
|
||||||
|
" Options o (*this);\n"
|
||||||
|
" o.componentToWatchForDeletion = ∁\n"
|
||||||
|
" o.isWatchingForDeletion = true;\n"
|
||||||
|
" return o;\n"
|
||||||
|
"}}\n";
|
||||||
|
valueOfTok(code, "return");
|
||||||
}
|
}
|
||||||
|
|
||||||
void valueFlowCrash() {
|
void valueFlowCrash() {
|
||||||
|
|
Loading…
Reference in New Issue