26 lines · cpp
1// RUN: %clang_tysan -O0 %s -o %t && %run %t >%t.out 2>&12// RUN: FileCheck --allow-empty %s < %t.out3 4// CHECK-NOT: TypeSanitizer5 6int foo() { return 0; }7 8struct Bar {9 struct S2 {10 int (*fnA)();11 int (*fnB)();12 };13 14 static int x() { return 0; }15 16 static const S2 &get() {17 static constexpr S2 Info = {&foo, &Bar::x};18 return Info;19 }20};21 22int main() {23 auto Info = Bar::get();24 return Info.fnB();25}26