brintos

brintos / llvm-project-archived public Read only

0
0
Text · 346 B · 39705bf Raw
26 lines · cpp
1// RUN: %clangxx_tysan %s -o %t && %run %t 2>&1 | FileCheck --implicit-check-not ERROR %s2 3#include <stdio.h>4 5class Inner {6public:7  void *ptr = nullptr;8};9 10class Base {11public:12  void *buffer1;13  Inner inside;14  void *buffer2;15};16 17class Derrived : public Base {};18 19Derrived derr;20 21int main() {22  printf("%p", derr.inside.ptr);23 24  return 0;25}26