1 // RUN: %clang_cc1 -std=c++98 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s
2 // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s
9 // Make sure this doesn't crash; the mangling doesn't matter because the name
10 // doesn't have linkage.
11 static struct : S { } obj8;
14 // Make sure this doesn't crash; the mangling doesn't matter because the
15 // generated vtable/etc. aren't modifiable (although it would be nice for
16 // codesize to make it consistent inside inline functions).
17 static struct : S { } obj8;
21 // FIXME: We don't mangle the names of a or x correctly!
22 static struct { int a() { static int x; return ++x; } } obj;
26 int f3() { return f2(); }
29 typedef struct { int x; } *ptr;
33 // FIXME: We don't mangle the names of a or x correctly!
34 int a(ptr A::*memp) { static int x; return ++x; }
40 int f4() { return A().a(); }
51 #if __cplusplus <= 199711L
76 // This used to cause an assert because the typedef-for-anonymous-tag
77 // code was trying to claim the enum for the template.
79 template <class T> struct Test8 {
81 Test8(type t) {} // tested later
83 template <class T> void make_test8(T value) { Test8<T> t(value); }
84 void test8() { make_test8(T8); }
86 // CHECK-LABEL: define internal void @"_ZNV3$_35test9Ev"(
87 typedef volatile struct {
88 void test9() volatile {}
95 // CHECK-LABEL: define internal void @"_ZN5Test8I3$_2EC1ES0_"(