@@ -522,18 +522,18 @@ module StrConv {
522522 ParseFloat ( ) { this .hasQualifiedName ( "strconv" , "ParseFloat" ) }
523523 }
524524
525- /** A function that parses integers with a specifiable bitSize . */
525+ /** A function that parses integers with a specifiable bit size . */
526526 class ParseInt extends Function {
527527 ParseInt ( ) { this .hasQualifiedName ( "strconv" , "ParseInt" ) }
528528 }
529529
530- /** A function that parses unsigned integers with a specifiable bitSize . */
530+ /** A function that parses unsigned integers with a specifiable bit size . */
531531 class ParseUint extends Function {
532532 ParseUint ( ) { this .hasQualifiedName ( "strconv" , "ParseUint" ) }
533533 }
534534
535535 /**
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`
537537 * value on the current architecture (32 or 64).
538538 */
539539 class IntSize extends DeclaredConstant {
@@ -549,14 +549,14 @@ module ParserCall {
549549 abstract int getTargetBitSize ( ) ;
550550
551551 /** Holds if the type of the result number is signed. */
552- abstract boolean getTargetIsSigned ( ) ;
552+ abstract predicate targetIsSigned ( ) ;
553553
554554 /** Gets the name of the parser function. */
555555 abstract string getParserName ( ) ;
556556 }
557557}
558558
559- /** A call to a number-parsing function */
559+ /** A call to a number-parsing function. */
560560class ParserCall extends DataFlow:: CallNode {
561561 ParserCall:: Range self ;
562562
@@ -566,7 +566,7 @@ class ParserCall extends DataFlow::CallNode {
566566 int getTargetBitSize ( ) { result = self .getTargetBitSize ( ) }
567567
568568 /** Holds if the type of the result number is signed. */
569- boolean getTargetIsSigned ( ) { result = self .getTargetIsSigned ( ) }
569+ predicate targetIsSigned ( ) { self .targetIsSigned ( ) }
570570
571571 /** Gets the name of the parser function. */
572572 string getParserName ( ) { result = self .getParserName ( ) }
@@ -579,18 +579,18 @@ class ParserCall extends DataFlow::CallNode {
579579 }
580580}
581581
582- /** A call to `strconv.Atoi` */
582+ /** A call to `strconv.Atoi`. */
583583class AtoiCall extends DataFlow:: CallNode , ParserCall:: Range {
584584 AtoiCall ( ) { exists ( StrConv:: Atoi atoi | this = atoi .getACall ( ) ) }
585585
586586 override int getTargetBitSize ( ) { result = 0 }
587587
588- override boolean getTargetIsSigned ( ) { result = true }
588+ override predicate targetIsSigned ( ) { any ( ) }
589589
590590 override string getParserName ( ) { result = "strconv.Atoi" }
591591}
592592
593- /** A call to `strconv.ParseInt` */
593+ /** A call to `strconv.ParseInt`. */
594594class ParseIntCall extends DataFlow:: CallNode , ParserCall:: Range {
595595 ParseIntCall ( ) { exists ( StrConv:: ParseInt parseInt | this = parseInt .getACall ( ) ) }
596596
@@ -600,12 +600,12 @@ class ParseIntCall extends DataFlow::CallNode, ParserCall::Range {
600600 else result = this .getArgument ( 2 ) .getIntValue ( )
601601 }
602602
603- override boolean getTargetIsSigned ( ) { result = true }
603+ override predicate targetIsSigned ( ) { any ( ) }
604604
605605 override string getParserName ( ) { result = "strconv.ParseInt" }
606606}
607607
608- /** A call to `strconv.ParseUint` */
608+ /** A call to `strconv.ParseUint`. */
609609class ParseUintCall extends DataFlow:: CallNode , ParserCall:: Range {
610610 ParseUintCall ( ) { exists ( StrConv:: ParseUint parseUint | this = parseUint .getACall ( ) ) }
611611
@@ -615,7 +615,7 @@ class ParseUintCall extends DataFlow::CallNode, ParserCall::Range {
615615 else result = this .getArgument ( 2 ) .getIntValue ( )
616616 }
617617
618- override boolean getTargetIsSigned ( ) { result = false }
618+ override predicate targetIsSigned ( ) { none ( ) }
619619
620620 override string getParserName ( ) { result = "strconv.ParseUint" }
621621}
0 commit comments