Merge pull request #641 from BBasile/issue-640
fix #640 - Warning for variable used in ctor but not in standard func merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
This commit is contained in:
commit
1ac9b85e04
|
@ -138,6 +138,7 @@ final class UnmodifiedFinder : BaseAnalyzer
|
||||||
mixin PartsMightModify!AsmPrimaryExp;
|
mixin PartsMightModify!AsmPrimaryExp;
|
||||||
mixin PartsMightModify!IndexExpression;
|
mixin PartsMightModify!IndexExpression;
|
||||||
mixin PartsMightModify!FunctionCallExpression;
|
mixin PartsMightModify!FunctionCallExpression;
|
||||||
|
mixin PartsMightModify!NewExpression;
|
||||||
mixin PartsMightModify!IdentifierOrTemplateChain;
|
mixin PartsMightModify!IdentifierOrTemplateChain;
|
||||||
mixin PartsMightModify!ReturnStatement;
|
mixin PartsMightModify!ReturnStatement;
|
||||||
|
|
||||||
|
@ -368,4 +369,15 @@ bool isValueTypeSimple(const Type type) pure nothrow @nogc
|
||||||
void foo(){auto e = new E;}
|
void foo(){auto e = new E;}
|
||||||
}, sac);
|
}, sac);
|
||||||
|
|
||||||
|
assertAnalyzerWarnings(q{
|
||||||
|
void issue640()
|
||||||
|
{
|
||||||
|
size_t i1;
|
||||||
|
new Foo(i1);
|
||||||
|
|
||||||
|
size_t i2;
|
||||||
|
foo(i2);
|
||||||
|
}
|
||||||
|
}, sac);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue