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 {
756756 SystemDateTimeStruct ( ) { this .hasName ( "DateTime" ) }
757757}
758758
759+ /** The `System.DateTimeOffset` struct. */
760+ class SystemDateTimeOffsetStruct extends SystemStruct {
761+ SystemDateTimeOffsetStruct ( ) { this .hasName ( "DateTimeOffset" ) }
762+ }
763+
759764/** The `System.Span<T>` struct. */
760765class SystemSpanStruct extends SystemUnboundGenericStruct {
761766 SystemSpanStruct ( ) {
Original file line number Diff line number Diff line change @@ -57,8 +57,9 @@ class SimpleTypeSanitizedExpr extends DataFlow::ExprNode {
5757 SimpleTypeSanitizedExpr ( ) {
5858 exists ( Type t | t = this .getType ( ) or t = this .getType ( ) .( NullableType ) .getUnderlyingType ( ) |
5959 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
6263 )
6364 }
6465}
You can’t perform that action at this time.
0 commit comments