Skip to content

Commit 9e3d772

Browse files
committed
C++: Accept test changes after frontend update and uncomment test case
The new frontend version does less constant folding.
1 parent ae5b58c commit 9e3d772

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cpp/ql/test/library-tests/constants/addresses/addresses.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ void constantAddresses(int param) {
2626
constexpr int *array2d = &int_arr_arr[1][1] + 1;
2727
constexpr int *const_ints = &int_arr_arr[int_const][extern_int_const];
2828

29-
// Commented out because clang and EDG disagree on whether this is
30-
// constant.
31-
//constexpr int *stmtexpr_int = &int_arr[ ({ 1; }) ];
29+
constexpr int *stmtexpr_int = &int_arr[ ({ 1; }) ];
3230

3331
constexpr int *comma_int = &int_arr[ ((void)0, 1) ];
3432
constexpr int *comma_addr = ((void)0, &int_var);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
| addresses.cpp:29:35:29:54 | & ... | stmtexpr_int | misclassified as NOT constant |
2+
| addresses.cpp:31:32:31:55 | & ... | comma_int | misclassified as NOT constant |
3+
| addresses.cpp:36:39:36:70 | ... ? ... : ... | ternary_ptr_cond | misclassified as NOT constant |
4+
| addresses.cpp:37:35:37:69 | & ... | ptr_subtract | misclassified as NOT constant |
5+
| addresses.cpp:39:35:39:50 | ... + ... | constexpr_va | misclassified as NOT constant |

0 commit comments

Comments
 (0)