This commit is contained in:
Hackerpilot 2015-01-05 17:52:10 -08:00
parent 74dd63e723
commit 7a80c0f643
1 changed files with 19 additions and 18 deletions

View File

@ -42,29 +42,30 @@ class UndocumentedDeclarationCheck : BaseAnalyzer
setOverride(true); setOverride(true);
} }
} }
else
bool shouldPop = false;
bool prevOverride = getOverride();
bool ovr = false;
foreach (attribute; dec.attributes)
{ {
bool shouldPop = false; shouldPop = dec.attributeDeclaration !is null;
bool prevOverride = getOverride(); if (isProtection(attribute.attribute.type))
bool ovr = false;
foreach (attribute; dec.attributes)
{ {
if (isProtection(attribute.attribute.type)) if (dec.attributeDeclaration)
{ set(attribute.attribute.type);
shouldPop = true; else
push(attribute.attribute.type); push(attribute.attribute.type);
}
else if (attribute.attribute == tok!"override")
ovr = true;
} }
if (ovr) else if (attribute.attribute == tok!"override")
setOverride(true); ovr = true;
dec.accept(this);
if (shouldPop)
pop();
if (ovr)
setOverride(prevOverride);
} }
if (ovr)
setOverride(true);
dec.accept(this);
if (shouldPop)
pop();
if (ovr)
setOverride(prevOverride);
} }
override void visit(const VariableDeclaration variable) override void visit(const VariableDeclaration variable)