diff options
Diffstat (limited to 'test/CodeGenCXX/derived-to-base.cpp')
-rw-r--r-- | test/CodeGenCXX/derived-to-base.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGenCXX/derived-to-base.cpp b/test/CodeGenCXX/derived-to-base.cpp new file mode 100644 index 0000000..63492d6 --- /dev/null +++ b/test/CodeGenCXX/derived-to-base.cpp @@ -0,0 +1,16 @@ +// RUN: clang-cc -emit-llvm %s -o - +struct A { + void f(); + + int a; +}; + +struct B : A { + double b; +}; + +void f() { + B b; + + b.f(); +} |