Skip to content

Commit

Permalink
Merge branch 'main' into promote-unsigned-difference-expression-compa…
Browse files Browse the repository at this point in the history
…red-zero-to-code-scanning
  • Loading branch information
MathiasVP committed Jul 15, 2024
2 parents 22e2036 + 18cde3b commit 16ed628
Show file tree
Hide file tree
Showing 249 changed files with 17,377 additions and 6,447 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/compile-queries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
key: all-queries
- name: check formatting
run: find shared */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only
- name: Omit DatabaseQualityDiagnostics.ql from compile checking # Remove me once CodeQL 2.18.0 is released!
run: mv java/ql/src/Telemetry/DatabaseQualityDiagnostics.ql{,.hidden}
- name: compile queries - check-only
# run with --check-only if running in a PR (github.sha != main)
if : ${{ github.event_name == 'pull_request' }}
Expand All @@ -41,6 +39,3 @@ jobs:
if : ${{ github.event_name != 'pull_request' }}
shell: bash
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500
- name: Restore DatabaseQualityDiagnostics.ql after compile checking # Remove me once CodeQL 2.18.0 is released
run: mv java/ql/src/Telemetry/DatabaseQualityDiagnostics.ql{.hidden,}

17 changes: 17 additions & 0 deletions cpp/downgrades/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/exprs.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class Expr extends @expr {
string toString() { none() }
}

class Location extends @location_expr {
string toString() { none() }
}

predicate isExprWithNewBuiltin(Expr expr) {
exists(int kind | exprs(expr, kind, _) | 364 <= kind and kind <= 384)
}

from Expr expr, int kind, int kind_new, Location location
where
exprs(expr, kind, location) and
if isExprWithNewBuiltin(expr) then kind_new = 1 else kind_new = kind
select expr, kind_new, location
Loading

0 comments on commit 16ed628

Please sign in to comment.