[llvm-commits] CVS: llvm/test/Regression/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr
Chris Lattner
lattner at cs.uiuc.edu
Sun Nov 9 01:06:02 PST 2003
Changes in directory llvm/test/Regression/C++Frontend:
2003-11-09-ConstructorTypeSafety.cpp.tr added (r1.1)
---
Log message:
New testcase
---
Diffs of the changes: (+20 -0)
Index: llvm/test/Regression/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr
diff -c /dev/null llvm/test/Regression/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr:1.1
*** /dev/null Sun Nov 9 01:05:13 2003
--- llvm/test/Regression/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr Sun Nov 9 01:05:02 2003
***************
*** 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;
+ }
+
More information about the llvm-commits
mailing list