We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a1987a commit 0f21075Copy full SHA for 0f21075
cpp/ql/test/library-tests/dataflow/asExpr/test.cpp
@@ -21,3 +21,20 @@ A& get_ref();
21
void test2() {
22
take_ref(get_ref()); // $ asExpr="call to get_ref" asIndirectExpr="call to get_ref"
23
}
24
+
25
+struct S {
26
+ int a;
27
+ int b;
28
+};
29
30
+void test_aggregate_literal() {
31
+ S s1 = {1, 2}; // $ asExpr=1 asExpr=2
32
+ const S s2 = {3, 4}; // $ asExpr=3 asExpr=4
33
+ S s3 = (S){5, 6}; // $ asExpr=5 asExpr=6
34
+ const S s4 = (S){7, 8}; // $ asExpr=7 asExpr=8
35
36
+ S s5 = {.a = 1, .b = 2}; // $ asExpr=1 asExpr=2
37
38
+ int xs[] = {1, 2, 3}; // $ asExpr=1 asExpr=2 asExpr=3
39
+ const int ys[] = {[0] = 4, [1] = 5, [0] = 6}; // $ asExpr=4 asExpr=5 asExpr=6
40
+}
0 commit comments