C++: Remove uniqueness constraint from uuid

Different class definitions can have the same uuid. This happens for
example when using `#import <msxml6.dll>` there will be several C++
classes generated in `msxml6.tlh` which will share uuids with
`extern "C"` struct declarations in the system header `msxml.h`.

Notice that as far as the standard cpp QL library and queries go, we
expose `getUuid()` on `UserType` and we never try to invert it, so we
only rely on uniqueness of the `id` column in the `usertype_uuid` table,
not the `uuid` column.

Closes github/codeql-c-team#893
This commit is contained in:
Paolo Tranquilli
2022-03-10 10:33:37 +01:00
parent dfb20f7721
commit 34829e92b1
7 changed files with 8389 additions and 1 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Remove uniqueness constraint from the uuid property
compatibility: full

View File

@@ -703,7 +703,7 @@ usertype_final(unique int id: @usertype ref);
usertype_uuid( usertype_uuid(
unique int id: @usertype ref, unique int id: @usertype ref,
unique string uuid: string ref string uuid: string ref
); );
mangled_name( mangled_name(

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Remove uniqueness constraint from the uuid property
compatibility: full