mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Merge rc/1.18 into master.
This commit is contained in:
@@ -54,13 +54,13 @@ Type stripType(Type t) {
|
||||
|
||||
/**
|
||||
* Holds if `t` points to `base` via a specified number of levels of pointer
|
||||
* indirection. Intermediate typedefs and array types are allowed.
|
||||
* indirection. Intermediate typedefs and array types are allowed. Note that
|
||||
* `base` is a stripped type (via `stripType`).
|
||||
*/
|
||||
predicate pointerIndirection(Type t, int indirection, Type base) {
|
||||
exists(Type u |
|
||||
u = stripType(t) and
|
||||
u = stripType(base) and
|
||||
not u instanceof PointerType and
|
||||
(
|
||||
base = stripType(t) and
|
||||
not base instanceof PointerType and
|
||||
indirection = 0
|
||||
) or (
|
||||
pointerIndirection(stripType(t).(PointerType).getBaseType(), indirection - 1, base)
|
||||
|
||||
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Semmle C/C++ Default Queries
|
||||
Bundle-SymbolicName: com.semmle.plugin.semmlecode.cpp.queries;singleton:=true
|
||||
Bundle-Version: 1.18.2.qualifier
|
||||
Bundle-Version: 1.18.3.qualifier
|
||||
Bundle-Vendor: Semmle Ltd.
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.2.qualifier,1.18.2.qualifier]"
|
||||
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.3.qualifier,1.18.3.qualifier]"
|
||||
|
||||
@@ -442,12 +442,17 @@ library class ExprEvaluator extends int {
|
||||
)
|
||||
}
|
||||
|
||||
/** Holds if the function `f` is considered by the analysis and may return `ret`. */
|
||||
pragma[noinline]
|
||||
private predicate interestingReturnValue(Function f, Expr ret) {
|
||||
interestingFunction(_, f) and
|
||||
returnStmt(f, ret)
|
||||
}
|
||||
|
||||
private int getFunctionValue(Function f) {
|
||||
interestingFunction(_, f)
|
||||
and
|
||||
// All returns must have the same int value
|
||||
// And it must have at least one return
|
||||
forex(Expr ret | returnStmt(f, ret) | result = getValueInternalNonSubExpr(ret))
|
||||
forex(Expr ret | interestingReturnValue(f, ret) | result = getValueInternalNonSubExpr(ret))
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Semmle C# Default Queries
|
||||
Bundle-SymbolicName: com.semmle.plugin.semmlecode.csharp.queries;singleton:=true
|
||||
Bundle-Version: 1.18.2.qualifier
|
||||
Bundle-Version: 1.18.3.qualifier
|
||||
Bundle-Vendor: Semmle Ltd.
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.2.qualifier,1.18.2.qualifier]"
|
||||
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.3.qualifier,1.18.3.qualifier]"
|
||||
|
||||
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Semmle Default Java Queries
|
||||
Bundle-SymbolicName: com.semmle.plugin.semmlecode.queries;singleton:=true
|
||||
Bundle-Version: 1.18.2.qualifier
|
||||
Bundle-Version: 1.18.3.qualifier
|
||||
Bundle-Vendor: Semmle Ltd.
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.2.qualifier,1.18.2.qualifier]"
|
||||
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.3.qualifier,1.18.3.qualifier]"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Semmle JavaScript Default Queries
|
||||
Bundle-SymbolicName: com.semmle.plugin.semmlecode.javascript.queries;singleton:=true
|
||||
Bundle-Version: 1.18.2.qualifier
|
||||
Bundle-Version: 1.18.3.qualifier
|
||||
Bundle-Vendor: Semmle Ltd.
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.2.qualifier,1.18.2.qualifier]"
|
||||
Require-Bundle: com.semmle.plugin.qdt.ui;bundle-version="[1.18.3.qualifier,1.18.3.qualifier]"
|
||||
|
||||
Reference in New Issue
Block a user