[modules] Add a regression test for PR21547.

llvm-svn: 264908
This commit is contained in:
Vassil Vassilev 2016-03-30 20:10:07 +00:00
parent 38bf13d02c
commit a3cbf2a738
3 changed files with 24 additions and 0 deletions

View File

@ -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>;

View File

@ -0,0 +1,4 @@
module M {
header "FirstHeader.h"
export *
}

View File

@ -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