Skip to content

Commit 7779f14

Browse files
committed
C++: Remove unused external_package tables from the dbscheme
1 parent a791640 commit 7779f14

File tree

2 files changed

+1
-38
lines changed

2 files changed

+1
-38
lines changed

cpp/ql/lib/semmlecode.cpp.dbscheme

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -217,29 +217,6 @@ diagnostics(
217217

218218
/*- C++ dbscheme -*/
219219

220-
/**
221-
* Information about packages that provide code used during compilation.
222-
* The `id` is just a unique identifier.
223-
* The `namespace` is typically the name of the package manager that
224-
* provided the package (e.g. "dpkg" or "yum").
225-
* The `package_name` is the name of the package, and `version` is its
226-
* version (as a string).
227-
*/
228-
external_packages(
229-
unique int id: @external_package,
230-
string namespace : string ref,
231-
string package_name : string ref,
232-
string version : string ref
233-
);
234-
235-
/**
236-
* Holds if File `fileid` was provided by package `package`.
237-
*/
238-
header_to_external_package(
239-
int fileid : @file ref,
240-
int package : @external_package ref
241-
);
242-
243220
/*
244221
* C++ dbscheme
245222
*/

cpp/ql/src/Metrics/Dependencies/ExternalDependencies.qll

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ private newtype LibraryT =
2626
LibraryTElement(LibraryElement lib, string name, string version) {
2727
lib.getName() = name and
2828
lib.getVersion() = version
29-
} or
30-
LibraryTExternalPackage(@external_package ep, string name, string version) {
31-
exists(string package_name |
32-
external_packages(ep, _, package_name, version) and
33-
name = package_name
34-
)
3529
}
3630

3731
/**
@@ -41,10 +35,7 @@ class Library extends LibraryT {
4135
string name;
4236
string version;
4337

44-
Library() {
45-
this = LibraryTElement(_, name, version) or
46-
this = LibraryTExternalPackage(_, name, version)
47-
}
38+
Library() { this = LibraryTElement(_, name, version) }
4839

4940
string getName() { result = name }
5041

@@ -63,11 +54,6 @@ class Library extends LibraryT {
6354
this = LibraryTElement(lib, _, _) and
6455
result = lib.getAFile()
6556
)
66-
or
67-
exists(@external_package ep |
68-
this = LibraryTExternalPackage(ep, _, _) and
69-
header_to_external_package(unresolveElement(result), ep)
70-
)
7157
}
7258
}
7359

0 commit comments

Comments
 (0)