aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-09 07:05:02 +0000
committerChris Lattner <sabre@nondot.org>2003-11-09 07:05:02 +0000
commit786cfa59ba6e19b1d5896b1956ccbf718f27a04b (patch)
treef8968339301bae041fe2966e794777f5db45b8e2 /test
parentd77922f1a2ed9290544ded8a50d52fd24065556f (diff)
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr b/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr
new file mode 100644
index 0000000000..0475002c51
--- /dev/null
+++ b/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr
@@ -0,0 +1,20 @@
+// The code generated for this testcase should be completely typesafe!
+// RUN: %llvmgcc -xc++ -S -o - %s | not grep ' cast '
+
+struct contained {
+ unsigned X;
+ contained();
+};
+
+struct base {
+ unsigned A, B;
+};
+
+struct derived : public base {
+ contained _M_value_field;
+};
+
+int test() {
+ derived X;
+}
+