Skip to content

Commit 6d09687

Browse files
committed
C++: Fix NameQualifyingElement db inconsistency
1 parent 98f1475 commit 6d09687

4 files changed

Lines changed: 4 additions & 8 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ class NullPointerType extends BuiltInType {
10711071
* const float fa[40];
10721072
* ```
10731073
*/
1074-
class DerivedType extends Type, @derivedtype {
1074+
class DerivedType extends Type, NameQualifyingElement, @derivedtype {
10751075
override string toString() { result = this.getName() }
10761076

10771077
override string getName() { derivedtypes(underlyingElement(this), result, _, _) }

cpp/ql/lib/semmlecode.cpp.dbscheme

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,8 @@ specialnamequalifyingelements(
14301430
@namequalifyingelement = @namespace
14311431
| @specialnamequalifyingelement
14321432
| @usertype
1433-
| @decltype;
1433+
| @decltype
1434+
| @derivedtype;
14341435

14351436
namequalifiers(
14361437
unique int id: @namequalifier,

cpp/ql/test/library-tests/name_qualifiers/DB-CHECK.expected

Lines changed: 0 additions & 5 deletions
This file was deleted.

cpp/ql/test/library-tests/name_qualifiers/NameQualifiers1.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
| inconsistency2.cpp:3:3:3:5 | T:: | inconsistency2.cpp:3:3:3:6 | x | inconsistency2.cpp:2:20:2:20 | T |
2-
| inconsistency2.cpp:3:3:3:11 | (no string representation) | inconsistency2.cpp:3:3:3:6 | x | file://:0:0:0:0 | const s |
2+
| inconsistency2.cpp:3:3:3:11 | const s:: | inconsistency2.cpp:3:3:3:6 | x | file://:0:0:0:0 | const s |
33
| inconsistency.cpp:7:20:7:22 | S:: | inconsistency.cpp:7:20:7:23 | (int)... | inconsistency.cpp:4:8:4:8 | S |
44
| inconsistency.cpp:7:20:7:22 | S:: | inconsistency.cpp:7:20:7:23 | A | inconsistency.cpp:4:8:4:8 | S |
55
| name_qualifiers.cpp:29:7:29:8 | :: | name_qualifiers.cpp:29:7:29:9 | x | file://:0:0:0:0 | (global namespace) |

0 commit comments

Comments
 (0)