mirror of
https://github.com/dlang-community/D-Scanner.git
synced 2025-05-05 09:40:03 +03:00
fix #588 - trust_too_much false positive with alias decl
This commit is contained in:
parent
cb31d2501e
commit
873c8f506a
1 changed files with 13 additions and 0 deletions
|
@ -61,6 +61,15 @@ public:
|
||||||
d.accept(this);
|
d.accept(this);
|
||||||
checkAtAttribute = oldCheckAtAttribute;
|
checkAtAttribute = oldCheckAtAttribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// issue #588
|
||||||
|
override void visit(const AliasDeclaration d)
|
||||||
|
{
|
||||||
|
const oldCheckAtAttribute = checkAtAttribute;
|
||||||
|
checkAtAttribute = false;
|
||||||
|
d.accept(this);
|
||||||
|
checkAtAttribute = oldCheckAtAttribute;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unittest
|
unittest
|
||||||
|
@ -132,5 +141,9 @@ unittest
|
||||||
}
|
}
|
||||||
}c , sac);
|
}c , sac);
|
||||||
|
|
||||||
|
assertAnalyzerWarnings(q{
|
||||||
|
alias nothrow @trusted uint F4();
|
||||||
|
}c , sac);
|
||||||
|
|
||||||
stderr.writeln("Unittest for TrustTooMuchCheck passed.");
|
stderr.writeln("Unittest for TrustTooMuchCheck passed.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue