File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
src/semmle/code/cpp/dataflow/internal
test/library-tests/dataflow/partialdefinitions Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,12 @@ private module PartialDefinitions {
113113 )
114114 )
115115 } or
116- TExplicitCallQualifier ( Expr qualifier , Call call ) { qualifier = call .getQualifier ( ) } or
116+ TExplicitCallQualifier ( Expr qualifier ) {
117+ exists ( Call call |
118+ qualifier = call .getQualifier ( ) and
119+ not call .getTarget ( ) .hasSpecifier ( "const" )
120+ )
121+ } or
117122 TReferenceArgument ( Expr arg , VariableAccess va ) { referenceArgument ( va , arg ) }
118123
119124 private predicate isInstanceFieldWrite ( FieldAccess fa , ControlFlowNode node ) {
@@ -128,7 +133,7 @@ private module PartialDefinitions {
128133 PartialDefinition ( ) {
129134 this = TExplicitFieldStoreQualifier ( definedExpr , node )
130135 or
131- this = TExplicitCallQualifier ( definedExpr , _ ) and node = definedExpr
136+ this = TExplicitCallQualifier ( definedExpr ) and node = definedExpr
132137 or
133138 this = TReferenceArgument ( definedExpr , node )
134139 }
Original file line number Diff line number Diff line change 33| partialdefinitions.cpp:15:4:15:4 | partial def of y | partialdefinitions.cpp:15:4:15:4 | y | partialdefinitions.cpp:15:2:15:10 | ... = ... |
44| partialdefinitions.cpp:22:29:22:32 | partial def of this | file://:0:0:0:0 | this | partialdefinitions.cpp:22:29:22:40 | ... = ... |
55| partialdefinitions.cpp:27:3:27:7 | partial def of myInt | partialdefinitions.cpp:27:3:27:7 | myInt | partialdefinitions.cpp:27:3:27:7 | myInt |
6- | partialdefinitions.cpp:28:7:28:11 | partial def of myInt | partialdefinitions.cpp:28:7:28:11 | myInt | partialdefinitions.cpp:28:7:28:11 | myInt |
7- | partialdefinitions.cpp:30:10:30:14 | partial def of myInt | partialdefinitions.cpp:30:10:30:14 | myInt | partialdefinitions.cpp:30:10:30:14 | myInt |
You can’t perform that action at this time.
0 commit comments