summaryrefslogtreecommitdiff
path: root/test/CXX
diff options
context:
space:
mode:
authorAnton Bikineev <ant.bikineev@gmail.com>2018-10-10 16:14:51 +0000
committerAnton Bikineev <ant.bikineev@gmail.com>2018-10-10 16:14:51 +0000
commit27fe8790f1e12d29a15188192f52f2ac3e4fd672 (patch)
tree0ab833b28efa2086ef8e072cfe0ac34243645a31 /test/CXX
parente0e7c043bbdb567c1434f252c44172945d604994 (diff)
downloadclang-27fe8790f1e12d29a15188192f52f2ac3e4fd672.tar.gz
[CodeGenCXX] Treat 'this' as noalias in constructors
This is currently a clang extension and a resolution of the defect report in the C++ Standard. Differential Revision: https://reviews.llvm.org/D46441 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX')
-rw-r--r--test/CXX/except/except.spec/p14-ir.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/CXX/except/except.spec/p14-ir.cpp b/test/CXX/except/except.spec/p14-ir.cpp
index af1d9a4425..553857d76e 100644
--- a/test/CXX/except/except.spec/p14-ir.cpp
+++ b/test/CXX/except/except.spec/p14-ir.cpp
@@ -26,12 +26,12 @@ struct X4 {
struct X5 : X0, X4 { };
void test(X2 x2, X3 x3, X5 x5) {
- // CHECK: define linkonce_odr void @_ZN2X2C1ERKS_(%struct.X2* %this, %struct.X2* dereferenceable({{[0-9]+}})) unnamed_addr
+ // CHECK: define linkonce_odr void @_ZN2X2C1ERKS_(%struct.X2* noalias %this, %struct.X2* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN2X2C2ERKS_({{.*}}) [[NUW:#[0-9]+]]
// CHECK-NEXT: ret void
// CHECK-NEXT: }
X2 x2a(x2);
- // CHECK: define linkonce_odr void @_ZN2X3C1ERKS_(%struct.X3* %this, %struct.X3* dereferenceable({{[0-9]+}})) unnamed_addr
+ // CHECK: define linkonce_odr void @_ZN2X3C1ERKS_(%struct.X3* noalias %this, %struct.X3* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN2X3C2ERKS_({{.*}}) [[NUW]]
// CHECK-NEXT: ret void
// CHECK-NEXT: }
@@ -55,22 +55,22 @@ struct X8 : X6 { };
struct X9 : X6, X7 { };
void test() {
- // CHECK: define linkonce_odr void @_ZN2X8C1Ev(%struct.X8* %this) unnamed_addr
+ // CHECK: define linkonce_odr void @_ZN2X8C1Ev(%struct.X8* noalias %this) unnamed_addr
// CHECK: call void @_ZN2X8C2Ev({{.*}}) [[NUW]]
// CHECK-NEXT: ret void
X8();
- // CHECK: define linkonce_odr void @_ZN2X9C1Ev(%struct.X9* %this) unnamed_addr
+ // CHECK: define linkonce_odr void @_ZN2X9C1Ev(%struct.X9* noalias %this) unnamed_addr
// FIXME: check that this is the end of the line here:
// CHECK: call void @_ZN2X9C2Ev({{.*}})
// CHECK-NEXT: ret void
X9();
- // CHECK: define linkonce_odr void @_ZN2X8C2Ev(%struct.X8* %this) unnamed_addr
+ // CHECK: define linkonce_odr void @_ZN2X8C2Ev(%struct.X8* noalias %this) unnamed_addr
// CHECK: call void @_ZN2X6C2Ev({{.*}}) [[NUW]]
// CHECK-NEXT: ret void
- // CHECK: define linkonce_odr void @_ZN2X9C2Ev(%struct.X9* %this) unnamed_addr
+ // CHECK: define linkonce_odr void @_ZN2X9C2Ev(%struct.X9* noalias %this) unnamed_addr
// CHECK: call void @_ZN2X6C2Ev({{.*}}) [[NUW]]
// FIXME: and here:
// CHECK-NEXT: bitcast