summaryrefslogtreecommitdiffstats
path: root/test/FrontendObjC++/2010-08-02-NonPODObjectValue.mm
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2010-09-17 15:48:55 +0000
committerdim <dim@FreeBSD.org>2010-09-17 15:48:55 +0000
commit5d5cc59cc77afe655b3707cb0e69e0827b444cad (patch)
tree36453626c792cccd91f783a38a169d610a6b9db9 /test/FrontendObjC++/2010-08-02-NonPODObjectValue.mm
parent786a18553586229ad99ecb5ecde8a9d914c45e27 (diff)
downloadFreeBSD-src-5d5cc59cc77afe655b3707cb0e69e0827b444cad.zip
FreeBSD-src-5d5cc59cc77afe655b3707cb0e69e0827b444cad.tar.gz
Vendor import of llvm r114020 (from the release_28 branch):
http://llvm.org/svn/llvm-project/llvm/branches/release_28@114020 Approved by: rpaulo (mentor)
Diffstat (limited to 'test/FrontendObjC++/2010-08-02-NonPODObjectValue.mm')
-rw-r--r--test/FrontendObjC++/2010-08-02-NonPODObjectValue.mm27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/FrontendObjC++/2010-08-02-NonPODObjectValue.mm b/test/FrontendObjC++/2010-08-02-NonPODObjectValue.mm
new file mode 100644
index 0000000..298844e
--- /dev/null
+++ b/test/FrontendObjC++/2010-08-02-NonPODObjectValue.mm
@@ -0,0 +1,27 @@
+// RUN: not %llvmgcc %s -S -emit-llvm -o - |& FileCheck %s
+// This tests for a specific diagnostic in LLVM-GCC.
+// Clang compiles this correctly with no diagnostic,
+// ergo this test will fail with a Clang-based front-end.
+class TFENodeVector {
+public:
+ TFENodeVector(const TFENodeVector& inNodeVector);
+ TFENodeVector();
+};
+
+@interface TWindowHistoryEntry {}
+@property (assign, nonatomic) TFENodeVector targetPath;
+@end
+
+@implementation TWindowHistoryEntry
+@synthesize targetPath;
+- (void) initWithWindowController {
+ TWindowHistoryEntry* entry;
+ TFENodeVector newPath;
+ // CHECK: setting a C++ non-POD object value is not implemented
+#ifdef __clang__
+#error setting a C++ non-POD object value is not implemented
+#endif
+ entry.targetPath = newPath;
+ [entry setTargetPath:newPath];
+}
+@end
OpenPOWER on IntegriCloud