diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /test/Modules/using-decl-inheritance.cpp | |
parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) |
Diffstat (limited to 'test/Modules/using-decl-inheritance.cpp')
-rw-r--r-- | test/Modules/using-decl-inheritance.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/Modules/using-decl-inheritance.cpp b/test/Modules/using-decl-inheritance.cpp new file mode 100644 index 000000000000..eba9636b75ef --- /dev/null +++ b/test/Modules/using-decl-inheritance.cpp @@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -x c++ -fmodules -fmodules-local-submodule-visibility -fmodules-cache-path=%t %s -verify +// RUN: %clang_cc1 -x c++ -fmodules -fmodules-cache-path=%t %s -verify + +// expected-no-diagnostics + +#pragma clang module build A + module A { } +#pragma clang module contents +#pragma clang module begin A +struct A { + virtual void Foo(double x) const; +}; +#pragma clang module end +#pragma clang module endbuild + +#pragma clang module build B + module B { } +#pragma clang module contents +#pragma clang module begin B +#pragma clang module import A +struct B : A { + using A::Foo; + virtual void Foo(double x) const; +}; +#pragma clang module end +#pragma clang module endbuild + +#pragma clang module import B + +int main() { + B b; + b.Foo(1.0); +} + |