Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions go/ql/lib/semmle/go/Expr.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion go/ql/lib/semmle/go/controlflow/IR.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion go/ql/src/filters/ClassifyFiles.ql
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading