mirror of
https://github.com/dlang-community/D-Scanner.git
synced 2025-05-02 16:20:14 +03:00
Fix #286
This commit is contained in:
parent
f50c4bb43f
commit
e5279e94f7
1 changed files with 10 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue