@@ -522,18 +522,18 @@ module StrConv {
522
522
ParseFloat ( ) { this .hasQualifiedName ( "strconv" , "ParseFloat" ) }
523
523
}
524
524
525
- /** A function that parses integers with a specifiable bitSize . */
525
+ /** A function that parses integers with a specifiable bit size . */
526
526
class ParseInt extends Function {
527
527
ParseInt ( ) { this .hasQualifiedName ( "strconv" , "ParseInt" ) }
528
528
}
529
529
530
- /** A function that parses unsigned integers with a specifiable bitSize . */
530
+ /** A function that parses unsigned integers with a specifiable bit size . */
531
531
class ParseUint extends Function {
532
532
ParseUint ( ) { this .hasQualifiedName ( "strconv" , "ParseUint" ) }
533
533
}
534
534
535
535
/**
536
- * A constant that gives the size in bits of an int or uint
536
+ * A constant that gives the size in bits of an ` int` or ` uint`
537
537
* value on the current architecture (32 or 64).
538
538
*/
539
539
class IntSize extends DeclaredConstant {
@@ -549,14 +549,14 @@ module ParserCall {
549
549
abstract int getTargetBitSize ( ) ;
550
550
551
551
/** Holds if the type of the result number is signed. */
552
- abstract boolean getTargetIsSigned ( ) ;
552
+ abstract predicate targetIsSigned ( ) ;
553
553
554
554
/** Gets the name of the parser function. */
555
555
abstract string getParserName ( ) ;
556
556
}
557
557
}
558
558
559
- /** A call to a number-parsing function */
559
+ /** A call to a number-parsing function. */
560
560
class ParserCall extends DataFlow:: CallNode {
561
561
ParserCall:: Range self ;
562
562
@@ -566,7 +566,7 @@ class ParserCall extends DataFlow::CallNode {
566
566
int getTargetBitSize ( ) { result = self .getTargetBitSize ( ) }
567
567
568
568
/** Holds if the type of the result number is signed. */
569
- boolean getTargetIsSigned ( ) { result = self .getTargetIsSigned ( ) }
569
+ predicate targetIsSigned ( ) { self .targetIsSigned ( ) }
570
570
571
571
/** Gets the name of the parser function. */
572
572
string getParserName ( ) { result = self .getParserName ( ) }
@@ -579,18 +579,18 @@ class ParserCall extends DataFlow::CallNode {
579
579
}
580
580
}
581
581
582
- /** A call to `strconv.Atoi` */
582
+ /** A call to `strconv.Atoi`. */
583
583
class AtoiCall extends DataFlow:: CallNode , ParserCall:: Range {
584
584
AtoiCall ( ) { exists ( StrConv:: Atoi atoi | this = atoi .getACall ( ) ) }
585
585
586
586
override int getTargetBitSize ( ) { result = 0 }
587
587
588
- override boolean getTargetIsSigned ( ) { result = true }
588
+ override predicate targetIsSigned ( ) { any ( ) }
589
589
590
590
override string getParserName ( ) { result = "strconv.Atoi" }
591
591
}
592
592
593
- /** A call to `strconv.ParseInt` */
593
+ /** A call to `strconv.ParseInt`. */
594
594
class ParseIntCall extends DataFlow:: CallNode , ParserCall:: Range {
595
595
ParseIntCall ( ) { exists ( StrConv:: ParseInt parseInt | this = parseInt .getACall ( ) ) }
596
596
@@ -600,12 +600,12 @@ class ParseIntCall extends DataFlow::CallNode, ParserCall::Range {
600
600
else result = this .getArgument ( 2 ) .getIntValue ( )
601
601
}
602
602
603
- override boolean getTargetIsSigned ( ) { result = true }
603
+ override predicate targetIsSigned ( ) { any ( ) }
604
604
605
605
override string getParserName ( ) { result = "strconv.ParseInt" }
606
606
}
607
607
608
- /** A call to `strconv.ParseUint` */
608
+ /** A call to `strconv.ParseUint`. */
609
609
class ParseUintCall extends DataFlow:: CallNode , ParserCall:: Range {
610
610
ParseUintCall ( ) { exists ( StrConv:: ParseUint parseUint | this = parseUint .getACall ( ) ) }
611
611
@@ -615,7 +615,7 @@ class ParseUintCall extends DataFlow::CallNode, ParserCall::Range {
615
615
else result = this .getArgument ( 2 ) .getIntValue ( )
616
616
}
617
617
618
- override boolean getTargetIsSigned ( ) { result = false }
618
+ override predicate targetIsSigned ( ) { none ( ) }
619
619
620
620
override string getParserName ( ) { result = "strconv.ParseUint" }
621
621
}
0 commit comments