diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
commit | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch) | |
tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /test/CodeGenCXX/mangle.cpp | |
parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) | |
download | src-d6acbbc5861bd881541bca6f0df4ac28c578f5b6.tar.gz src-d6acbbc5861bd881541bca6f0df4ac28c578f5b6.zip |
Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release):vendor/clang/clang-release_350-r216957
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle.cpp | 52 |
1 files changed, 46 insertions, 6 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index d836f36c1818..9bdac7f17289 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/test/CodeGenCXX/mangle.cpp @@ -216,9 +216,9 @@ struct S7 { }; // PR5139 -// CHECK: @_ZN2S7C1Ev // CHECK: @_ZN2S7C2Ev // CHECK: @_ZN2S7Ut_C1Ev +// CHECK: @_ZN2S7C1Ev S7::S7() {} // PR5063 @@ -280,13 +280,13 @@ struct Ops { void *v; }; -// CHECK-LABEL: define %struct.Ops* @_ZN3OpsplERKS_ +// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsplERKS_ Ops& Ops::operator+(const Ops&) { return *this; } -// CHECK-LABEL: define %struct.Ops* @_ZN3OpsmiERKS_ +// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsmiERKS_ Ops& Ops::operator-(const Ops&) { return *this; } -// CHECK-LABEL: define %struct.Ops* @_ZN3OpsanERKS_ +// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsanERKS_ Ops& Ops::operator&(const Ops&) { return *this; } -// CHECK-LABEL: define %struct.Ops* @_ZN3OpsmlERKS_ +// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsmlERKS_ Ops& Ops::operator*(const Ops&) { return *this; } // PR5861 @@ -899,7 +899,7 @@ namespace test39 { } namespace test40 { - // CHECK: i32* @_ZZN6test401fEvE1a_0 + // CHECK: i32* {{.*}} @_ZZN6test401fEvE1a_0 void h(int&); inline void f() { if (0) { @@ -951,3 +951,43 @@ namespace test44 { } // CHECK-LABEL: define linkonce_odr void @_ZN6test443foo3barEv(%"struct.test44::foo"* %this) } + +namespace test45 { + struct S { + enum e {}; + }; + template <typename T> + void f(enum T::e *) {} + template void f<S>(S::e *); + // CHECK-LABEL: define weak_odr void @_ZN6test451fINS_1SEEEvPTeNT_1eE(i32*) +} + +namespace test46 { + struct S { + struct s {}; + }; + template <typename T> + void f(struct T::s *) {} + template void f<S>(S::s *); + // CHECK-LABEL: define weak_odr void @_ZN6test461fINS_1SEEEvPTsNT_1sE(%"struct.test46::S::s"*) +} + +namespace test47 { + struct S { + class c {}; + }; + template <typename T> + void f(class T::c *) {} + template void f<S>(S::c *); + // CHECK-LABEL: define weak_odr void @_ZN6test471fINS_1SEEEvPTsNT_1cE(%"class.test47::S::c"*) +} + +namespace test48 { + struct S { + union u {}; + }; + template <typename T> + void f(union T::u *) {} + template void f<S>(S::u *); + // CHECK-LABEL: define weak_odr void @_ZN6test481fINS_1SEEEvPTuNT_1uE(%"union.test48::S::u"*) +} |