Fix #286
This commit is contained in:
parent
f50c4bb43f
commit
e5279e94f7
|
@ -174,6 +174,13 @@ class UnmodifiedFinder:BaseAnalyzer
|
||||||
// issue #270: Ignore unmodified variables inside of `typeof` expressions
|
// issue #270: Ignore unmodified variables inside of `typeof` expressions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override void visit(const AsmStatement a)
|
||||||
|
{
|
||||||
|
inAsm = true;
|
||||||
|
a.accept(this);
|
||||||
|
inAsm = false;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
template PartsMightModify(T)
|
template PartsMightModify(T)
|
||||||
|
@ -193,7 +200,7 @@ private:
|
||||||
if (guaranteeUse == 0)
|
if (guaranteeUse == 0)
|
||||||
{
|
{
|
||||||
auto r = tree[index].equalRange(&vi);
|
auto r = tree[index].equalRange(&vi);
|
||||||
if (!r.empty && r.front.isValueType)
|
if (!r.empty && r.front.isValueType && !inAsm)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
while (true)
|
while (true)
|
||||||
|
@ -289,6 +296,8 @@ private:
|
||||||
|
|
||||||
int isImmutable;
|
int isImmutable;
|
||||||
|
|
||||||
|
bool inAsm;
|
||||||
|
|
||||||
RedBlackTree!(VariableInfo*, "a.name < b.name")[] tree;
|
RedBlackTree!(VariableInfo*, "a.name < b.name")[] tree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue