Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions actions/ql/test/utils/ActionsInlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import T::TestPostProcessing
private module Impl implements T::InlineExpectationsTestSig {
class Location = Locations::Location;

class ExpectationComment extends Yaml::YamlComment {
string getContents() { result = this.getText() }
}
}

private module Input implements T::TestPostProcessing::InputSig<Impl> {
string getRelativeUrl(Locations::Location location) {
exists(int startLine, int startColumn, int endLine, int endColumn |
location.hasLocationInfo(_, startLine, startColumn, endLine, endColumn)
Expand All @@ -25,6 +19,10 @@ private module Input implements T::TestPostProcessing::InputSig<Impl> {
":" + endColumn
)
}

class ExpectationComment extends Yaml::YamlComment {
string getContents() { result = this.getText() }
}
}

import T::TestPostProcessing::Make<Impl, Input>
import T::TestPostProcessing::Make<Impl>
14 changes: 1 addition & 13 deletions cpp/ql/lib/utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ private import cpp
private import codeql.util.test.InlineExpectationsTest as T
private import internal.InlineExpectationsTestImpl
import T::TestPostProcessing
import T::TestPostProcessing::Make<Impl, Input>

private module Input implements T::TestPostProcessing::InputSig<Impl> {
string getRelativeUrl(Location location) {
exists(File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
import T::TestPostProcessing::Make<Impl>
10 changes: 10 additions & 0 deletions cpp/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,14 @@ module Impl implements InlineExpectationsTestSig {
}

class Location = C::Location;

string getRelativeUrl(Location location) {
exists(C::File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
4 changes: 2 additions & 2 deletions cpp/ql/test/include/iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace std {
};

template<class Container>
constexpr back_insert_iterator<Container> back_inserter(Container& x) { // $ ir-def=*x
constexpr back_insert_iterator<Container> back_inserter(Container& x) {
return back_insert_iterator<Container>(x);
}

Expand All @@ -89,7 +89,7 @@ namespace std {
constexpr front_insert_iterator operator++(int);
};
template<class Container>
constexpr front_insert_iterator<Container> front_inserter(Container& x) { // $ ir-def=*x
constexpr front_insert_iterator<Container> front_inserter(Container& x) {
return front_insert_iterator<Container>(x);
}
}
Expand Down
14 changes: 1 addition & 13 deletions csharp/ql/lib/utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ private import csharp
private import codeql.util.test.InlineExpectationsTest as T
private import internal.InlineExpectationsTestImpl
import T::TestPostProcessing
import T::TestPostProcessing::Make<Impl, Input>

private module Input implements T::TestPostProcessing::InputSig<Impl> {
string getRelativeUrl(Location location) {
exists(File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
import T::TestPostProcessing::Make<Impl>
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,14 @@ module Impl implements InlineExpectationsTestSig {
}

class Location = CS::Location;

string getRelativeUrl(Location location) {
exists(CS::File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
14 changes: 1 addition & 13 deletions go/ql/lib/utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ private import go
private import codeql.util.test.InlineExpectationsTest as T
private import internal.InlineExpectationsTestImpl
import T::TestPostProcessing
import T::TestPostProcessing::Make<Impl, Input>

private module Input implements T::TestPostProcessing::InputSig<Impl> {
string getRelativeUrl(Location location) {
exists(File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
import T::TestPostProcessing::Make<Impl>
10 changes: 10 additions & 0 deletions go/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,14 @@ module Impl implements InlineExpectationsTestSig {
}

class Location = G::Location;

string getRelativeUrl(Location location) {
exists(G::File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
14 changes: 1 addition & 13 deletions java/ql/lib/utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ private import java
private import codeql.util.test.InlineExpectationsTest as T
private import internal.InlineExpectationsTestImpl
import T::TestPostProcessing
import T::TestPostProcessing::Make<Impl, Input>

private module Input implements T::TestPostProcessing::InputSig<Impl> {
string getRelativeUrl(Location location) {
exists(File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
import T::TestPostProcessing::Make<Impl>
10 changes: 10 additions & 0 deletions java/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,14 @@ module Impl implements InlineExpectationsTestSig {
}

class Location = J::Location;

string getRelativeUrl(Location location) {
exists(J::File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,14 @@ module Impl implements InlineExpectationsTestSig {
}

class Location = J::Location;

string getRelativeUrl(Location location) {
exists(J::File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,14 @@ module Impl implements InlineExpectationsTestSig {
}

class Location = J::Location;

string getRelativeUrl(Location location) {
exists(J::File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
14 changes: 1 addition & 13 deletions javascript/ql/lib/utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ private import javascript
private import codeql.util.test.InlineExpectationsTest as T
private import internal.InlineExpectationsTestImpl
import T::TestPostProcessing
import T::TestPostProcessing::Make<Impl, Input>

private module Input implements T::TestPostProcessing::InputSig<Impl> {
string getRelativeUrl(Location location) {
exists(File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
import T::TestPostProcessing::Make<Impl>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ module Impl implements InlineExpectationsTestSig {

class Location = JS::Location;

string getRelativeUrl(Location location) {
exists(JS::File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}

abstract private class ExpectationCommentImpl extends Locatable {
abstract string getContents();

Expand Down
14 changes: 1 addition & 13 deletions python/ql/lib/utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ private import python
private import codeql.util.test.InlineExpectationsTest as T
private import internal.InlineExpectationsTestImpl
import T::TestPostProcessing
import T::TestPostProcessing::Make<Impl, Input>

private module Input implements T::TestPostProcessing::InputSig<Impl> {
string getRelativeUrl(Location location) {
exists(File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
import T::TestPostProcessing::Make<Impl>
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,14 @@ module Impl implements InlineExpectationsTestSig {
class ExpectationComment = PY::Comment;

class Location = PY::Location;

string getRelativeUrl(Location location) {
exists(PY::File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
14 changes: 1 addition & 13 deletions ql/ql/src/utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ private import ql
private import codeql.util.test.InlineExpectationsTest as T
private import internal.InlineExpectationsTestImpl
import T::TestPostProcessing
import T::TestPostProcessing::Make<Impl, Input>

private module Input implements T::TestPostProcessing::InputSig<Impl> {
string getRelativeUrl(Location location) {
exists(File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
import T::TestPostProcessing::Make<Impl>
10 changes: 10 additions & 0 deletions ql/ql/src/utils/test/internal/InlineExpectationsTestImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,14 @@ module Impl implements InlineExpectationsTestSig {
}

class Location = QL::Location;

string getRelativeUrl(Location location) {
exists(QL::File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
14 changes: 1 addition & 13 deletions ruby/ql/lib/utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ private import ruby
private import codeql.util.test.InlineExpectationsTest as T
private import internal.InlineExpectationsTestImpl
import T::TestPostProcessing
import T::TestPostProcessing::Make<Impl, Input>

private module Input implements T::TestPostProcessing::InputSig<Impl> {
string getRelativeUrl(Location location) {
exists(File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
import T::TestPostProcessing::Make<Impl>
10 changes: 10 additions & 0 deletions ruby/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,14 @@ module Impl implements InlineExpectationsTestSig {
}

class Location = R::Location;

string getRelativeUrl(Location location) {
exists(R::File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
14 changes: 1 addition & 13 deletions rust/ql/lib/utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,4 @@ private import rust
private import codeql.util.test.InlineExpectationsTest as T
private import internal.InlineExpectationsTestImpl
import T::TestPostProcessing
import T::TestPostProcessing::Make<Impl, Input>

private module Input implements T::TestPostProcessing::InputSig<Impl> {
string getRelativeUrl(Location location) {
exists(File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
import T::TestPostProcessing::Make<Impl>
10 changes: 10 additions & 0 deletions rust/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,14 @@ module Impl implements InlineExpectationsTestSig {
}

class Location = R::Location;

string getRelativeUrl(Location location) {
exists(R::File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
Loading
Loading