File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -10,19 +10,10 @@ private import ssa0.SsaInternals as SsaInternals0
1010import SsaInternalsCommon
1111
1212private module SourceVariables {
13- int getMaxIndirectionForIRVariable ( IRVariable var ) {
14- exists ( Type type , boolean isGLValue |
15- var .getLanguageType ( ) .hasType ( type , isGLValue ) and
16- if isGLValue = true
17- then result = 1 + getMaxIndirectionsForType ( type )
18- else result = getMaxIndirectionsForType ( type )
19- )
20- }
21-
2213 cached
2314 private newtype TSourceVariable =
2415 TSourceIRVariable ( BaseIRVariable baseVar , int ind ) {
25- ind = [ 0 .. getMaxIndirectionForIRVariable ( baseVar .getIRVariable ( ) ) ]
16+ ind = [ 0 .. countIndirectionsForCppType ( baseVar .getIRVariable ( ) . getLanguageType ( ) ) + 1 ]
2617 } or
2718 TCallVariable ( AllocationInstruction call , int ind ) {
2819 ind = [ 0 .. countIndirectionsForCppType ( getResultLanguageType ( call ) ) ]
You can’t perform that action at this time.
0 commit comments