File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
cpp/ql/src/semmle/code/cpp/commons Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -10,22 +10,23 @@ import cpp
1010class PackedTimeType extends Type {
1111 PackedTimeType ( ) {
1212 this .getName ( ) = "_FILETIME" or
13- this .getName ( ) . matches ( "_FILETIME %" )
13+ this .( DerivedType ) . getBaseType * ( ) . getName ( ) = "_FILETIME"
1414 }
1515}
1616
17+ private predicate timeType ( string typeName ) {
18+ typeName = "_SYSTEMTIME" or
19+ typeName = "SYSTEMTIME" or
20+ typeName = "tm"
21+ }
1722/**
1823 * A type that is used to represent times and dates in an 'unpacked' form, that is,
1924 * with separate fields for day, month, year etc.
2025 */
2126class UnpackedTimeType extends Type {
2227 UnpackedTimeType ( ) {
23- this .getName ( ) = "_SYSTEMTIME" or
24- this .getName ( ) = "SYSTEMTIME" or
25- this .getName ( ) = "tm" or
26- this .getName ( ) .matches ( "_SYSTEMTIME %" ) or
27- this .getName ( ) .matches ( "SYSTEMTIME %" ) or
28- this .getName ( ) .matches ( "tm %" )
28+ timeType ( this .getName ( ) ) or
29+ timeType ( this .( DerivedType ) .getBaseType * ( ) .getName ( ) )
2930 }
3031}
3132
You can’t perform that action at this time.
0 commit comments