From: Richard Smith Date: Thu, 28 Aug 2014 20:14:15 +0000 (+0000) Subject: [modules] PR20786: add (already passing) regression test from the bug report. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2085b8bb8e448e3d30176c5c769f263ccc8deeff;p=clang [modules] PR20786: add (already passing) regression test from the bug report. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216683 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Modules/Inputs/PR20786/TBranchProxy.h b/test/Modules/Inputs/PR20786/TBranchProxy.h new file mode 100644 index 0000000000..91f3730c3b --- /dev/null +++ b/test/Modules/Inputs/PR20786/TBranchProxy.h @@ -0,0 +1,2 @@ +#include "random.h" +#include "TFormula.h" diff --git a/test/Modules/Inputs/PR20786/TFormula.h b/test/Modules/Inputs/PR20786/TFormula.h new file mode 100644 index 0000000000..316e3ad722 --- /dev/null +++ b/test/Modules/Inputs/PR20786/TFormula.h @@ -0,0 +1 @@ +#include "TMath.h" diff --git a/test/Modules/Inputs/PR20786/TMath.h b/test/Modules/Inputs/PR20786/TMath.h new file mode 100644 index 0000000000..b7dba620f7 --- /dev/null +++ b/test/Modules/Inputs/PR20786/TMath.h @@ -0,0 +1 @@ +#include "random.h" diff --git a/test/Modules/Inputs/PR20786/module.modulemap b/test/Modules/Inputs/PR20786/module.modulemap new file mode 100644 index 0000000000..daf78cd0cd --- /dev/null +++ b/test/Modules/Inputs/PR20786/module.modulemap @@ -0,0 +1,3 @@ +module TMath { header "TMath.h" } +module TFormula { header "TFormula.h" } +module TBranchProxy { header "TBranchProxy.h" } diff --git a/test/Modules/Inputs/PR20786/random.h b/test/Modules/Inputs/PR20786/random.h new file mode 100644 index 0000000000..86a7d83c19 --- /dev/null +++ b/test/Modules/Inputs/PR20786/random.h @@ -0,0 +1,12 @@ +namespace std { + template struct mersenne_twister_engine { + friend bool operator==(const mersenne_twister_engine &, + const mersenne_twister_engine &) { + return false; + } + }; + struct random_device { + mersenne_twister_engine mt; // require complete type + }; +} + diff --git a/test/Modules/pr20786.cpp b/test/Modules/pr20786.cpp new file mode 100644 index 0000000000..35d62df91c --- /dev/null +++ b/test/Modules/pr20786.cpp @@ -0,0 +1,2 @@ +// RUN: rm -rf %T +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%T -fmodule-name=TBranchProxy -emit-module -x c++ %S/Inputs/PR20786/module.modulemap