summaryrefslogtreecommitdiff
path: root/test/FrontendObjC++
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendObjC++')
-rw-r--r--test/FrontendObjC++/2010-08-02-NonPODObjectValue.mm27
-rw-r--r--test/FrontendObjC++/2010-08-04-Template.mm10
-rw-r--r--test/FrontendObjC++/2010-08-06-X.Y-syntax.mm16
3 files changed, 53 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 0000000000000..298844e97b5d3
--- /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
diff --git a/test/FrontendObjC++/2010-08-04-Template.mm b/test/FrontendObjC++/2010-08-04-Template.mm
new file mode 100644
index 0000000000000..d0383406d7e27
--- /dev/null
+++ b/test/FrontendObjC++/2010-08-04-Template.mm
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc %s -S -emit-llvm
+struct TRunSoon {
+ template <class P1> static void Post() {}
+};
+
+@implementation TPrivsTableViewMainController
+- (void) applyToEnclosed {
+ TRunSoon::Post<int>();
+}
+@end
diff --git a/test/FrontendObjC++/2010-08-06-X.Y-syntax.mm b/test/FrontendObjC++/2010-08-06-X.Y-syntax.mm
new file mode 100644
index 0000000000000..b33d7307af49e
--- /dev/null
+++ b/test/FrontendObjC++/2010-08-06-X.Y-syntax.mm
@@ -0,0 +1,16 @@
+// RUN: %llvmgcc %s -S -emit-llvm
+struct TFENode {
+ TFENode(const TFENode& inNode);
+};
+
+@interface TIconViewController
+- (const TFENode&) target;
+@end
+
+void sortAllChildrenForNode(const TFENode&node);
+
+@implementation TIconViewController
+- (void) setArrangeBy {
+ sortAllChildrenForNode(self.target);
+}
+@end