This commit is contained in:
Hackerpilot 2015-10-09 14:54:28 -07:00
parent f50c4bb43f
commit e5279e94f7
1 changed files with 10 additions and 1 deletions

View File

@ -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;
} }