mirror of
https://github.com/dlang-community/D-Scanner.git
synced 2025-04-26 13:20:07 +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);
|
||||
checkAtAttribute = oldCheckAtAttribute;
|
||||
}
|
||||
|
||||
// issue #588
|
||||
override void visit(const AliasDeclaration d)
|
||||
{
|
||||
const oldCheckAtAttribute = checkAtAttribute;
|
||||
checkAtAttribute = false;
|
||||
d.accept(this);
|
||||
checkAtAttribute = oldCheckAtAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
unittest
|
||||
|
@ -132,5 +141,9 @@ unittest
|
|||
}
|
||||
}c , sac);
|
||||
|
||||
assertAnalyzerWarnings(q{
|
||||
alias nothrow @trusted uint F4();
|
||||
}c , sac);
|
||||
|
||||
stderr.writeln("Unittest for TrustTooMuchCheck passed.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue