diff --git a/go/ql/lib/semmle/go/Expr.qll b/go/ql/lib/semmle/go/Expr.qll index 4a4ab00f0538..54fec79e0804 100644 --- a/go/ql/lib/semmle/go/Expr.qll +++ b/go/ql/lib/semmle/go/Expr.qll @@ -829,7 +829,7 @@ class ConversionExpr extends CallOrConversionExpr { /** * A function call expression. * - * On snapshots with incomplete type information, type conversions may be misclassified + * On databases with incomplete type information, type conversions may be misclassified * as function call expressions. * * Examples: @@ -2093,7 +2093,7 @@ class LabelName extends Name { * Holds if `e` is a type expression, as determined by a bottom-up syntactic * analysis starting with `TypeName`s. * - * On a snapshot with full type information, this predicate covers all type + * On a database with full type information, this predicate covers all type * expressions. However, if type information is missing then not all type names * may be identified as such, so not all type expressions can be determined by * a bottom-up analysis. In such cases, `isTypeExprTopDown` below is useful. @@ -2131,11 +2131,12 @@ private predicate isTypeExprBottomUp(Expr e) { * Holds if `e` must be a type expression because it either occurs in a syntactic * position where a type is expected, or it is part of a larger type expression. * - * This predicate is only needed on snapshots for which type information is - * incomplete. It is an underapproximation; in cases where it is syntactically ambiguous - * whether an expression refers to a type or a value, we conservatively assume that - * it may be the latter and so this predicate does not consider the expression to be - * a type expression. + * This predicate is only needed on databases for which type information is + * incomplete - for example, when some dependencies could not be reached during + * extraction. It is an underapproximation; in cases where it is syntactically + * ambiguous whether an expression refers to a type or a value, we conservatively + * assume that it may be the latter and so this predicate does not consider the + * expression to be a type expression. */ pragma[nomagic] private predicate isTypeExprTopDown(Expr e) { @@ -2145,20 +2146,12 @@ private predicate isTypeExprTopDown(Expr e) { or e = any(ArrayTypeExpr ae).getElement() or - e = any(FieldDecl f).getTypeExpr() - or - e = any(ParameterDecl pd).getTypeExpr() + e = any(FieldBase fb).getTypeExpr() or e = any(TypeParamDecl tpd).getTypeConstraintExpr() or e = any(TypeParamDecl tpd).getNameExpr(_) or - e = any(ReceiverDecl rd).getTypeExpr() - or - e = any(ResultVariableDecl rvd).getTypeExpr() - or - e = any(MethodSpec md).getTypeExpr() - or e = any(MapTypeExpr mt).getKeyTypeExpr() or e = any(MapTypeExpr mt).getValueTypeExpr() diff --git a/go/ql/lib/semmle/go/controlflow/IR.qll b/go/ql/lib/semmle/go/controlflow/IR.qll index 144f0df6e7db..c6433900a739 100644 --- a/go/ql/lib/semmle/go/controlflow/IR.qll +++ b/go/ql/lib/semmle/go/controlflow/IR.qll @@ -294,7 +294,7 @@ module IR { /** * An IR instruction that reads the value of a field. * - * On snapshots with incomplete type information, method expressions may sometimes be + * On databases with incomplete type information, method expressions may sometimes be * misclassified as field reads. */ class FieldReadInstruction extends ComponentReadInstruction { diff --git a/go/ql/src/filters/ClassifyFiles.ql b/go/ql/src/filters/ClassifyFiles.ql index f5ac12583750..8e353740c1a7 100644 --- a/go/ql/src/filters/ClassifyFiles.ql +++ b/go/ql/src/filters/ClassifyFiles.ql @@ -1,6 +1,6 @@ /** * @name Classify files - * @description This query produces a list of all files in a snapshot that are classified as + * @description This query produces a list of all files in a database that are classified as * generated code, test code or vendored-in library code. * @kind file-classifier * @id go/file-classifier