diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-10-07 21:08:14 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-10-07 21:08:14 +0000 |
commit | 13bf6336ab395eb6af487ab96d32229460907769 (patch) | |
tree | 3257859051bcc03396f4e9edbd40812d1c21be80 /test/SemaObjCXX/property-synthesis-error.mm | |
parent | 63d3201619fdac284adfd3b9328562fa20a01c40 (diff) | |
download | clang-13bf6336ab395eb6af487ab96d32229460907769.tar.gz clang-13bf6336ab395eb6af487ab96d32229460907769.tar.bz2 clang-13bf6336ab395eb6af487ab96d32229460907769.tar.xz |
objc++: some minor cleanup and a test case
for atomic setters which requires assignment operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141415 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjCXX/property-synthesis-error.mm')
-rw-r--r-- | test/SemaObjCXX/property-synthesis-error.mm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/SemaObjCXX/property-synthesis-error.mm b/test/SemaObjCXX/property-synthesis-error.mm index f79a56db6c..5ba4b70a2b 100644 --- a/test/SemaObjCXX/property-synthesis-error.mm +++ b/test/SemaObjCXX/property-synthesis-error.mm @@ -43,19 +43,32 @@ private: void* fData; }; +class Trivial +{ +public: + Trivial(const Trivial& inObj); + Trivial(); + ~Trivial(); +private: + void* fData; +}; + @interface MyDocument { @private TCPPObject _cppObject; TCPPObject _ncppObject; + Trivial _tcppObject; } @property (assign, readwrite) const TCPPObject& cppObject; @property (assign, readwrite, nonatomic) const TCPPObject& ncppObject; +@property (assign, readwrite) const Trivial& tcppObject; @end @implementation MyDocument -@synthesize cppObject = _cppObject; // expected-warning {{atomic property of type 'const TCPPObject &' synthesizing setter using non-trivial assignmentoperator}} +@synthesize cppObject = _cppObject; // expected-warning {{atomic property of type 'const TCPPObject &' synthesizing setter using non-trivial assignment operator}} @synthesize ncppObject = _ncppObject; +@synthesize tcppObject = _tcppObject; @end |