Skip to content

Commit b9b2aa3

Browse files
authored
Merge pull request #16138 from jketema/coroutine3
C++: Update expected test results
2 parents c4e674b + 46c44b4 commit b9b2aa3

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,7 @@ private module IRDeclarationEntries {
506506
* An entity that represents a declaration entry in the database.
507507
*
508508
* This class exists to work around the fact that `DeclStmt`s in some cases
509-
* do not have `DeclarationEntry`s. Currently, this is the case for:
510-
* - `DeclStmt`s in template instantiations.
509+
* do not have `DeclarationEntry`s in older databases.
511510
*
512511
* So instead, the IR works with `IRDeclarationEntry`s that synthesize missing
513512
* `DeclarationEntry`s when there is no result for `DeclStmt::getDeclarationEntry`.

cpp/ql/test/library-tests/CPP-205/elements.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
| CPP-205.cpp:2:15:5:1 | { ... } | isFromUninstantiatedTemplate(fn) |
1111
| CPP-205.cpp:3:3:3:33 | declaration | isFromTemplateInstantiation(fn) |
1212
| CPP-205.cpp:3:3:3:33 | declaration | isFromUninstantiatedTemplate(fn) |
13+
| CPP-205.cpp:3:15:3:15 | declaration of y | isFromTemplateInstantiation(fn) |
1314
| CPP-205.cpp:3:15:3:15 | declaration of y | isFromUninstantiatedTemplate(fn) |
15+
| CPP-205.cpp:3:15:3:15 | y | isFromTemplateInstantiation(fn) |
1416
| CPP-205.cpp:3:15:3:15 | y | isFromUninstantiatedTemplate(fn) |
1517
| CPP-205.cpp:3:17:3:31 | 5 | isFromTemplateInstantiation(fn) |
1618
| CPP-205.cpp:4:3:4:11 | return ... | isFromTemplateInstantiation(fn) |

cpp/ql/test/library-tests/ir/ir/PrintAST.expected

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15440,6 +15440,8 @@ ir.cpp:
1544015440
# 1911| Type = [CTypedefType,NestedTypedefType] pointer
1544115441
# 1911| getEntryPoint(): [BlockStmt] { ... }
1544215442
# 1912| getStmt(0): [DeclStmt] declaration
15443+
# 1912| getDeclarationEntry(0): [TypeDeclarationEntry] declaration of _Res
15444+
# 1912| Type = [CTypedefType,LocalTypedefType] _Res
1544315445
# 1913| getStmt(1): [ReturnStmt] return ...
1544415446
# 1913| getExpr(): [VariableAccess] p
1544515447
# 1913| Type = [CTypedefType,NestedTypedefType] pointer
@@ -15547,6 +15549,10 @@ ir.cpp:
1554715549
# 1924| <params>:
1554815550
# 1924| getEntryPoint(): [BlockStmt] { ... }
1554915551
# 1925| getStmt(0): [DeclStmt] declaration
15552+
# 1925| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x
15553+
# 1925| Type = [ArrayType] int[10]
15554+
# 1925| getDeclarationEntry(1): [VariableDeclarationEntry] definition of y
15555+
# 1925| Type = [ArrayType] int[10]
1555015556
# 1926| getStmt(1): [ExprStmt] ExprStmt
1555115557
# 1926| getExpr(): [AssignExpr] ... = ...
1555215558
# 1926| Type = [IntType] int
@@ -15642,7 +15648,11 @@ ir.cpp:
1564215648
# 1939| <params>:
1564315649
# 1939| getEntryPoint(): [BlockStmt] { ... }
1564415650
# 1940| getStmt(0): [DeclStmt] declaration
15651+
# 1940| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of g
15652+
# 1940| Type = [IntType] int
1564515653
# 1941| getStmt(1): [DeclStmt] declaration
15654+
# 1941| getDeclarationEntry(0): [FunctionDeclarationEntry] declaration of z
15655+
# 1941| Type = [IntType] int
1564615656
# 1942| getStmt(2): [ReturnStmt] return ...
1564715657
# 1942| getExpr(): [VariableAccess] g
1564815658
# 1942| Type = [IntType] int

cpp/ql/test/library-tests/ir/ir/operand_locations.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9771,8 +9771,8 @@
97719771
| ir.cpp:1924:13:1924:13 | Load | m1928_9 |
97729772
| ir.cpp:1924:13:1924:13 | SideEffect | m1924_3 |
97739773
| ir.cpp:1924:13:1924:13 | SideEffect | m1924_8 |
9774-
| ir.cpp:1925:13:1925:29 | Address | &:r1925_1 |
9775-
| ir.cpp:1925:13:1925:29 | Address | &:r1925_3 |
9774+
| ir.cpp:1925:17:1925:17 | Address | &:r1925_1 |
9775+
| ir.cpp:1925:24:1925:24 | Address | &:r1925_3 |
97769776
| ir.cpp:1926:13:1926:14 | Address | &:r1926_4 |
97779777
| ir.cpp:1926:13:1926:19 | ChiPartial | partial:m1926_5 |
97789778
| ir.cpp:1926:13:1926:19 | ChiTotal | total:m1925_2 |

0 commit comments

Comments
 (0)