GeezerVison is showing github.com — Shared: Only make unlifted models in case the API itself is relevant. · github/codeql@80497f5
File tree
Expand file treeCollapse file tree
Open diff view settings
csharp/ql/src/utils/modelgenerator/internal java/ql/src/utils/modelgenerator/internal shared/mad/codeql/mad/modelgenerator/internal
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll +4-1Lines changed: 4 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -131,7 +131,10 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, CsharpDat |
131 | 131 |
|
132 | 132 | Callable lift() { result = lift } |
133 | 133 |
|
134 | | - predicate isRelevant() { relevant(this) } |
| 134 | + predicate isRelevant() { |
| 135 | + relevant(this) and |
| 136 | + not hasManualSummaryModel(this) |
| 137 | + } |
135 | 138 | } |
136 | 139 |
|
137 | 140 | /** |
|
Collapse file
Copy file name to clipboardExpand all lines: java/ql/src/utils/modelgenerator/internal/CaptureModels.qll +4-1Lines changed: 4 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -110,7 +110,10 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, JavaDataF |
110 | 110 |
|
111 | 111 | Callable lift() { result = lift } |
112 | 112 |
|
113 | | - predicate isRelevant() { relevant(this) } |
| 113 | + predicate isRelevant() { |
| 114 | + relevant(this) and |
| 115 | + not hasManualSummaryModel(this) |
| 116 | + } |
114 | 117 | } |
115 | 118 |
|
116 | 119 | private string isExtensible(Callable c) { |
|
Collapse file
Copy file name to clipboardExpand all lines: shared/mad/codeql/mad/modelgenerator/internal/ModelGeneratorImpl.qll +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -848,7 +848,11 @@ module MakeModelGenerator< |
848 | 848 | input = parameterNodeAsContentInput(p) + printReadAccessPath(reads) and |
849 | 849 | output = getContentOutput(returnNodeExt) + printStoreAccessPath(stores) and |
850 | 850 | input != output and |
851 | | - (if mentionsField(reads) or mentionsField(stores) then lift = false else lift = true) |
| 851 | + ( |
| 852 | + if mentionsField(reads) or mentionsField(stores) |
| 853 | + then lift = false and api.isRelevant() |
| 854 | + else lift = true |
| 855 | + ) |
852 | 856 | ) |
853 | 857 | } |
854 | 858 |
|
|