Skip to content

Commit 6dd0234

Browse files
tamasvajkhvitved
andcommitted
Apply suggestions from code review
Co-authored-by: Tom Hvitved <hvitved@github.com>
1 parent 214cc90 commit 6dd0234

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

csharp/extractor/Semmle.Extraction.CIL/Entities/TypeDefinitionType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ private bool IsSystemEnum(StringHandle typeName, StringHandle namespaceName)
271271
foreach (var handle in td.GetFields())
272272
{
273273
var field = Cx.MdReader.GetFieldDefinition(handle);
274-
if ((field.Attributes & FieldAttributes.Static) != 0)
274+
if (field.Attributes.HasFlag(FieldAttributes.Static))
275275
{
276276
continue;
277277
}

csharp/ql/src/semmle/code/cil/Types.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class Enum extends ValueOrRefType {
5050
override IntegralType getUnderlyingType() {
5151
cil_enum_underlying_type(this, result)
5252
or
53-
not exists(IntegralType underlying | cil_enum_underlying_type(this, underlying)) and
54-
result = any(IntType i)
53+
not cil_enum_underlying_type(this, _) and
54+
result instanceof IntType
5555
}
5656
}
5757

0 commit comments

Comments
 (0)