Clang import; some small tweaks
This commit is contained in:
parent
64612bf93e
commit
a9dbf129f0
|
@ -427,7 +427,8 @@ Token *clangastdump::AstNode::createTokens(TokenList *tokenList)
|
||||||
sep1->astOperand2(sep2);
|
sep1->astOperand2(sep2);
|
||||||
sep2->astOperand1(expr2);
|
sep2->astOperand1(expr2);
|
||||||
sep2->astOperand2(expr3);
|
sep2->astOperand2(expr3);
|
||||||
createScope(tokenList, Scope::ScopeType::eFor, children[4]);
|
Scope *scope = createScope(tokenList, Scope::ScopeType::eFor, children[4]);
|
||||||
|
scope->classDef = forToken;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
if (nodeType == FunctionDecl) {
|
if (nodeType == FunctionDecl) {
|
||||||
|
|
|
@ -4144,7 +4144,7 @@ static void valueFlowForwardAssign(Token * const tok,
|
||||||
ErrorLogger * const errorLogger,
|
ErrorLogger * const errorLogger,
|
||||||
const Settings * const settings)
|
const Settings * const settings)
|
||||||
{
|
{
|
||||||
const Token * const endOfVarScope = var->typeStartToken()->scope()->bodyEnd;
|
const Token * const endOfVarScope = var->nameToken()->scope()->bodyEnd;
|
||||||
if (std::any_of(values.begin(), values.end(), std::mem_fn(&ValueFlow::Value::isLifetimeValue))) {
|
if (std::any_of(values.begin(), values.end(), std::mem_fn(&ValueFlow::Value::isLifetimeValue))) {
|
||||||
valueFlowForwardLifetime(tok, tokenlist, errorLogger, settings);
|
valueFlowForwardLifetime(tok, tokenlist, errorLogger, settings);
|
||||||
values.remove_if(std::mem_fn(&ValueFlow::Value::isLifetimeValue));
|
values.remove_if(std::mem_fn(&ValueFlow::Value::isLifetimeValue));
|
||||||
|
|
Loading…
Reference in New Issue