Apply suggestions from code review

Co-authored-by: Tom Hvitved <hvitved@github.com>
This commit is contained in:
Tamás Vajk
2020-12-08 12:53:32 +01:00
committed by Tamas Vajk
parent 214cc90af5
commit 6dd0234b68
2 changed files with 3 additions and 3 deletions

View File

@@ -271,7 +271,7 @@ namespace Semmle.Extraction.CIL.Entities
foreach (var handle in td.GetFields())
{
var field = Cx.MdReader.GetFieldDefinition(handle);
if ((field.Attributes & FieldAttributes.Static) != 0)
if (field.Attributes.HasFlag(FieldAttributes.Static))
{
continue;
}

View File

@@ -50,8 +50,8 @@ class Enum extends ValueOrRefType {
override IntegralType getUnderlyingType() {
cil_enum_underlying_type(this, result)
or
not exists(IntegralType underlying | cil_enum_underlying_type(this, underlying)) and
result = any(IntType i)
not cil_enum_underlying_type(this, _) and
result instanceof IntType
}
}