r264908 - [modules] Add a regression test for PR21547.
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 30 13:10:07 PDT 2016
Author: vvassilev
Date: Wed Mar 30 15:10:07 2016
New Revision: 264908
URL: http://llvm.org/viewvc/llvm-project?rev=264908&view=rev
Log:
[modules] Add a regression test for PR21547.
Added:
cfe/trunk/test/Modules/Inputs/PR21547/
cfe/trunk/test/Modules/Inputs/PR21547/FirstHeader.h
cfe/trunk/test/Modules/Inputs/PR21547/module.modulemap
cfe/trunk/test/Modules/pr21547.cpp
Added: cfe/trunk/test/Modules/Inputs/PR21547/FirstHeader.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/PR21547/FirstHeader.h?rev=264908&view=auto
==============================================================================
--- cfe/trunk/test/Modules/Inputs/PR21547/FirstHeader.h (added)
+++ cfe/trunk/test/Modules/Inputs/PR21547/FirstHeader.h Wed Mar 30 15:10:07 2016
@@ -0,0 +1,13 @@
+template<class Element> struct TMatrixT;
+typedef TMatrixT<double> TMatrixD;
+
+void f(const TMatrixD &m);
+
+template<class Element> struct TMatrixT {
+ template <class Element2> TMatrixT(const TMatrixT<Element2> &);
+ ~TMatrixT() {}
+ void Determinant () { f(*this); }
+};
+
+template struct TMatrixT<float>;
+template struct TMatrixT<double>;
Added: cfe/trunk/test/Modules/Inputs/PR21547/module.modulemap
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/PR21547/module.modulemap?rev=264908&view=auto
==============================================================================
--- cfe/trunk/test/Modules/Inputs/PR21547/module.modulemap (added)
+++ cfe/trunk/test/Modules/Inputs/PR21547/module.modulemap Wed Mar 30 15:10:07 2016
@@ -0,0 +1,4 @@
+module M {
+ header "FirstHeader.h"
+ export *
+}
Added: cfe/trunk/test/Modules/pr21547.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/pr21547.cpp?rev=264908&view=auto
==============================================================================
--- cfe/trunk/test/Modules/pr21547.cpp (added)
+++ cfe/trunk/test/Modules/pr21547.cpp Wed Mar 30 15:10:07 2016
@@ -0,0 +1,7 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -I%S/Inputs/PR21547 -verify %s
+// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/PR21547 -verify %s
+
+#include "Inputs/PR21547/FirstHeader.h"
+
+//expected-no-diagnostics
More information about the cfe-commits
mailing list