File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
go/ql/lib/semmle/go/controlflow Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -524,7 +524,7 @@ module GoCfg {
524524 private predicate notBlankIdent ( Go:: Expr e ) { not e instanceof Go:: BlankIdent }
525525
526526 /** Helper: implicit field selection for promoted selectors */
527- predicate implicitFieldSelection ( Ast:: AstNode e , int index , Go:: Field implicitField ) {
527+ additional predicate implicitFieldSelection ( Ast:: AstNode e , int index , Go:: Field implicitField ) {
528528 exists ( Go:: StructType baseType , Go:: PromotedField child , int implicitFieldDepth |
529529 baseType = e .( Go:: PromotedSelector ) .getSelectedStructType ( ) and
530530 (
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ module IR {
2626 or
2727 this .isAdditional ( _, _)
2828 or
29- this .isAfterTrue ( _) and not this . isIn ( _ )
29+ this .isAfterTrue ( _)
3030 or
31- this .isAfterFalse ( _) and not this . isIn ( _ )
31+ this .isAfterFalse ( _)
3232 }
3333
3434 /** Holds if this instruction reads the value of variable or constant `v`. */
@@ -164,9 +164,9 @@ module IR {
164164 /** A condition guard instruction, representing a known boolean outcome for a condition. */
165165 private class ConditionGuardInstruction extends Instruction {
166166 ConditionGuardInstruction ( ) {
167- this .isAfterTrue ( _) and not this . isIn ( _ )
167+ this .isAfterTrue ( _)
168168 or
169- this .isAfterFalse ( _) and not this . isIn ( _ )
169+ this .isAfterFalse ( _)
170170 }
171171 }
172172
@@ -176,7 +176,7 @@ module IR {
176176 class EvalInstruction extends Instruction {
177177 Expr e ;
178178
179- EvalInstruction ( ) { this .isIn ( e ) and e instanceof Expr }
179+ EvalInstruction ( ) { this .isIn ( e ) }
180180
181181 /** Gets the expression underlying this instruction. */
182182 Expr getExpr ( ) { result = e }
@@ -778,7 +778,7 @@ module IR {
778778 class DeclareFunctionInstruction extends Instruction {
779779 FuncDecl fd ;
780780
781- DeclareFunctionInstruction ( ) { this .isIn ( fd ) and fd instanceof FuncDecl }
781+ DeclareFunctionInstruction ( ) { this .isIn ( fd ) }
782782
783783 override Type getResultType ( ) { result = fd .getType ( ) }
784784 }
You can’t perform that action at this time.
0 commit comments