File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
csharp/ql/lib/semmle/code/csharp Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -756,6 +756,11 @@ class SystemDateTimeStruct extends SystemStruct {
756
756
SystemDateTimeStruct ( ) { this .hasName ( "DateTime" ) }
757
757
}
758
758
759
+ /** The `System.DateTimeOffset` struct. */
760
+ class SystemDateTimeOffsetStruct extends SystemStruct {
761
+ SystemDateTimeOffsetStruct ( ) { this .hasName ( "DateTimeOffset" ) }
762
+ }
763
+
759
764
/** The `System.Span<T>` struct. */
760
765
class SystemSpanStruct extends SystemUnboundGenericStruct {
761
766
SystemSpanStruct ( ) {
Original file line number Diff line number Diff line change @@ -57,8 +57,9 @@ class SimpleTypeSanitizedExpr extends DataFlow::ExprNode {
57
57
SimpleTypeSanitizedExpr ( ) {
58
58
exists ( Type t | t = this .getType ( ) or t = this .getType ( ) .( NullableType ) .getUnderlyingType ( ) |
59
59
t instanceof SimpleType or
60
- t instanceof SystemDateTimeStruct
61
- // or t instanceof Enum
60
+ t instanceof SystemDateTimeStruct or
61
+ t instanceof SystemDateTimeOffsetStruct or
62
+ t instanceof Enum
62
63
)
63
64
}
64
65
}
You can’t perform that action at this time.
0 commit comments