[PATCH] D37180: [modules] Add test for using declaration in classes.
Raphael Isemann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 29 02:28:59 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL311991: [modules] Add test for using declaration in classes. (authored by teemperor).
Changed prior to commit:
https://reviews.llvm.org/D37180?vs=112788&id=113044#toc
Repository:
rL LLVM
https://reviews.llvm.org/D37180
Files:
cfe/trunk/test/Modules/using-decl-inheritance.cpp
Index: cfe/trunk/test/Modules/using-decl-inheritance.cpp
===================================================================
--- cfe/trunk/test/Modules/using-decl-inheritance.cpp
+++ cfe/trunk/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);
+}
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37180.113044.patch
Type: text/x-patch
Size: 1031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170829/d1970b34/attachment.bin>
More information about the cfe-commits
mailing list