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
10
10
import SsaInternalsCommon
11
11
12
12
private 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
-
22
13
cached
23
14
private newtype TSourceVariable =
24
15
TSourceIRVariable ( BaseIRVariable baseVar , int ind ) {
25
- ind = [ 0 .. getMaxIndirectionForIRVariable ( baseVar .getIRVariable ( ) ) ]
16
+ ind = [ 0 .. countIndirectionsForCppType ( baseVar .getIRVariable ( ) . getLanguageType ( ) ) + 1 ]
26
17
} or
27
18
TCallVariable ( AllocationInstruction call , int ind ) {
28
19
ind = [ 0 .. countIndirectionsForCppType ( getResultLanguageType ( call ) ) ]
You can’t perform that action at this time.
0 commit comments