Skip to content

Commit 62b3d5e

Browse files
authored
Merge branch 'main' into csharp-ext
2 parents 8347a41 + 19de7cd commit 62b3d5e

File tree

405 files changed

+4215
-4300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

405 files changed

+4215
-4300
lines changed

.bazelrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
build --repo_env=CC=clang --repo_env=CXX=clang++ --cxxopt="-std=c++20"
1+
common --enable_platform_specific_config
2+
3+
build --repo_env=CC=clang --repo_env=CXX=clang++
4+
5+
build:linux --cxxopt=-std=c++20
6+
build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
7+
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
28

39
try-import %workspace%/local.bazelrc

config/identical-files.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,10 @@
523523
"python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll",
524524
"ruby/ql/lib/codeql/ruby/typetracking/TypeTracker.qll"
525525
],
526+
"SummaryTypeTracker": [
527+
"python/ql/lib/semmle/python/dataflow/new/internal/SummaryTypeTracker.qll",
528+
"ruby/ql/lib/codeql/ruby/typetracking/internal/SummaryTypeTracker.qll"
529+
],
526530
"AccessPathSyntax": [
527531
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/AccessPathSyntax.qll",
528532
"go/ql/lib/semmle/go/dataflow/internal/AccessPathSyntax.qll",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Deleted the deprecated `getURL` predicate from the `Container`, `Folder`, and `File` classes. Use the `getLocation` predicate instead.

cpp/ql/lib/semmle/code/cpp/File.qll

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ class Container extends Locatable, @container {
3434
*/
3535
string getAbsolutePath() { none() } // overridden by subclasses
3636

37-
/**
38-
* DEPRECATED: Use `getLocation` instead.
39-
* Gets a URL representing the location of this container.
40-
*
41-
* For more information see [Providing URLs](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/#providing-urls).
42-
*/
43-
deprecated string getURL() { none() } // overridden by subclasses
44-
4537
/**
4638
* Gets the relative path of this file or folder from the root folder of the
4739
* analyzed source location. The relative path of the root folder itself is
@@ -183,12 +175,6 @@ class Folder extends Container, @folder {
183175
}
184176

185177
override string getAPrimaryQlClass() { result = "Folder" }
186-
187-
/**
188-
* DEPRECATED: Use `getLocation` instead.
189-
* Gets the URL of this folder.
190-
*/
191-
deprecated override string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }
192178
}
193179

194180
/**
@@ -213,12 +199,6 @@ class File extends Container, @file {
213199
result.hasLocationInfo(_, 0, 0, 0, 0)
214200
}
215201

216-
/**
217-
* DEPRECATED: Use `getLocation` instead.
218-
* Gets the URL of this file.
219-
*/
220-
deprecated override string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }
221-
222202
/** Holds if this file was compiled as C (at any point). */
223203
predicate compiledAsC() { fileannotations(underlyingElement(this), 1, "compiled as c", "1") }
224204

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,8 @@ module Impl<FullStateConfigSig Config> {
20212021
FlowCheckNode() {
20222022
castNode(this.asNode()) or
20232023
clearsContentCached(this.asNode(), _) or
2024-
expectsContentCached(this.asNode(), _)
2024+
expectsContentCached(this.asNode(), _) or
2025+
neverSkipInPathGraph(this.asNode())
20252026
}
20262027
}
20272028

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ class CastNode extends Node {
235235
CastNode() { none() } // stub implementation
236236
}
237237

238+
/**
239+
* Holds if `n` should never be skipped over in the `PathGraph` and in path
240+
* explanations.
241+
*/
242+
predicate neverSkipInPathGraph(Node n) { none() }
243+
238244
class DataFlowCallable = Function;
239245

240246
class DataFlowExpr = Expr;

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,8 @@ module Impl<FullStateConfigSig Config> {
20212021
FlowCheckNode() {
20222022
castNode(this.asNode()) or
20232023
clearsContentCached(this.asNode(), _) or
2024-
expectsContentCached(this.asNode(), _)
2024+
expectsContentCached(this.asNode(), _) or
2025+
neverSkipInPathGraph(this.asNode())
20252026
}
20262027
}
20272028

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,12 @@ class CastNode extends Node {
783783
CastNode() { none() } // stub implementation
784784
}
785785

786+
/**
787+
* Holds if `n` should never be skipped over in the `PathGraph` and in path
788+
* explanations.
789+
*/
790+
predicate neverSkipInPathGraph(Node n) { none() }
791+
786792
/**
787793
* A function that may contain code or a variable that may contain itself. When
788794
* flow crosses from one _enclosing callable_ to another, the interprocedural

csharp/ql/lib/semmle/code/csharp/dataflow/ExternalFlow.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
* in the given range. The range is inclusive at both ends.
6363
* - "ReturnValue": Selects the return value of a call to the selected element.
6464
*
65-
* For summaries, `input` and `output` may be prefixed by one of the following,
66-
* separated by the "of" keyword:
65+
* For summaries, `input` and `output` may be suffixed by any number of the
66+
* following, separated by ".":
6767
* - "Element": Selects an element in a collection.
6868
* - "Field[f]": Selects the contents of field `f`.
6969
* - "Property[p]": Selects the contents of property `p`.

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,8 @@ module Impl<FullStateConfigSig Config> {
20212021
FlowCheckNode() {
20222022
castNode(this.asNode()) or
20232023
clearsContentCached(this.asNode(), _) or
2024-
expectsContentCached(this.asNode(), _)
2024+
expectsContentCached(this.asNode(), _) or
2025+
neverSkipInPathGraph(this.asNode())
20252026
}
20262027
}
20272028

0 commit comments

Comments
 (0)