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 6f79545 commit 2d434d0Copy full SHA for 2d434d0
compiler-rt/test/tysan/struct-offset-different-base.cpp
@@ -6,28 +6,26 @@
6
#include <stdio.h>
7
8
struct inner {
9
- char buffer;
10
- int i;
+ char buffer;
+ int i;
11
};
12
13
-void init_inner(inner *iPtr) {
14
- iPtr->i = 200;
15
-}
+void init_inner(inner *iPtr) { iPtr->i = 200; }
16
17
struct outer {
18
- inner foo;
19
+ inner foo;
20
21
22
int main(void) {
23
- outer *l = new outer();
24
-
25
- init_inner(&l->foo);
26
27
- int access_offsets_with_different_base = l->foo.i;
28
- printf("Accessed value is %d\n", access_offsets_with_different_base);
29
30
- return 0;
+ outer *l = new outer();
+
+ init_inner(&l->foo);
+ int access_offsets_with_different_base = l->foo.i;
+ printf("Accessed value is %d\n", access_offsets_with_different_base);
+ return 0;
31
}
32
33
// CHECK: Accessed value is 200
0 commit comments