diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2012-01-10 00:37:01 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-01-10 00:37:01 +0000 |
| commit | a08a74705bb04e61752c43d7a6c61f73fc88c9c2 (patch) | |
| tree | abd446183cc08be9807fe2e79fba2d5d6ef8dd58 /clang/test/SemaObjCXX | |
| parent | 33289908f9b211be66a2304785dfb26ec51d3e86 (diff) | |
| download | bcm5719-llvm-a08a74705bb04e61752c43d7a6c61f73fc88c9c2.tar.gz bcm5719-llvm-a08a74705bb04e61752c43d7a6c61f73fc88c9c2.zip | |
objc++: patch for IRgen for atomic properties of
c++ objects with non-trivial assignment/copy functions.
Also, one additional sema check. // rdar://6137845
llvm-svn: 147817
Diffstat (limited to 'clang/test/SemaObjCXX')
| -rw-r--r-- | clang/test/SemaObjCXX/property-reference.mm | 4 | ||||
| -rw-r--r-- | clang/test/SemaObjCXX/property-synthesis-error.mm | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/SemaObjCXX/property-reference.mm b/clang/test/SemaObjCXX/property-reference.mm index 236dba61fc2..9cc51d53760 100644 --- a/clang/test/SemaObjCXX/property-reference.mm +++ b/clang/test/SemaObjCXX/property-reference.mm @@ -8,7 +8,7 @@ public: TCPPObject(); ~TCPPObject(); - TCPPObject& operator=(const TCPPObject& inObj)const ; + TCPPObject& operator=(const TCPPObject& inObj)const ; // expected-note {{'operator=' declared here}} void* Data(); @@ -29,7 +29,7 @@ typedef const TCPPObject& CREF_TCPPObject; @implementation TNSObject @synthesize cppObjectNonAtomic; -@synthesize cppObjectAtomic; // expected-warning{{atomic property of type 'CREF_TCPPObject' (aka 'const TCPPObject &') synthesizing setter using non-trivial assignment operator}} +@synthesize cppObjectAtomic; // expected-error{{atomic property of reference type 'CREF_TCPPObject' (aka 'const TCPPObject &') cannot have non-trivial assignment operator}} @dynamic cppObjectDynamic; - (const TCPPObject&) cppObjectNonAtomic diff --git a/clang/test/SemaObjCXX/property-synthesis-error.mm b/clang/test/SemaObjCXX/property-synthesis-error.mm index 5ba4b70a2b6..c50756622cc 100644 --- a/clang/test/SemaObjCXX/property-synthesis-error.mm +++ b/clang/test/SemaObjCXX/property-synthesis-error.mm @@ -38,7 +38,7 @@ public: TCPPObject(const TCPPObject& inObj); TCPPObject(); ~TCPPObject(); - TCPPObject& operator=(const TCPPObject& inObj); + TCPPObject& operator=(const TCPPObject& inObj); // expected-note {{'operator=' declared here}} private: void* fData; }; @@ -67,7 +67,7 @@ private: @implementation MyDocument -@synthesize cppObject = _cppObject; // expected-warning {{atomic property of type 'const TCPPObject &' synthesizing setter using non-trivial assignment operator}} +@synthesize cppObject = _cppObject; // expected-error {{atomic property of reference type 'const TCPPObject &' cannot have non-trivial assignment operator}} @synthesize ncppObject = _ncppObject; @synthesize tcppObject = _tcppObject; |

