summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Modules/Inputs/PR27754/RConversionRuleParser.h4
-rw-r--r--clang/test/Modules/Inputs/PR27754/TMetaUtils.h2
-rw-r--r--clang/test/Modules/Inputs/PR27754/TSchemaType.h2
-rw-r--r--clang/test/Modules/Inputs/PR27754/algobase.h4
-rw-r--r--clang/test/Modules/Inputs/PR27754/module.modulemap3
-rw-r--r--clang/test/Modules/pr27754.cpp7
6 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/PR27754/RConversionRuleParser.h b/clang/test/Modules/Inputs/PR27754/RConversionRuleParser.h
new file mode 100644
index 00000000000..057dd14698a
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR27754/RConversionRuleParser.h
@@ -0,0 +1,4 @@
+#include "algobase.h"
+typedef integral_constant<bool, true> true_type;
+class _Rb_tree { _Rb_tree() { true_type(); } };
+#include "TSchemaType.h"
diff --git a/clang/test/Modules/Inputs/PR27754/TMetaUtils.h b/clang/test/Modules/Inputs/PR27754/TMetaUtils.h
new file mode 100644
index 00000000000..835b7c6dc60
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR27754/TMetaUtils.h
@@ -0,0 +1,2 @@
+#include "RConversionRuleParser.h"
+void fn1() { true_type(); }
diff --git a/clang/test/Modules/Inputs/PR27754/TSchemaType.h b/clang/test/Modules/Inputs/PR27754/TSchemaType.h
new file mode 100644
index 00000000000..2c477931707
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR27754/TSchemaType.h
@@ -0,0 +1,2 @@
+#include "algobase.h"
+struct A : integral_constant<bool, true> {};
diff --git a/clang/test/Modules/Inputs/PR27754/algobase.h b/clang/test/Modules/Inputs/PR27754/algobase.h
new file mode 100644
index 00000000000..f5e47d8dc7d
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR27754/algobase.h
@@ -0,0 +1,4 @@
+#ifndef _STL_ALGOBASE_H
+#define _STL_ALGOBASE_H
+template<typename _Tp, _Tp> struct integral_constant {};
+#endif
diff --git a/clang/test/Modules/Inputs/PR27754/module.modulemap b/clang/test/Modules/Inputs/PR27754/module.modulemap
new file mode 100644
index 00000000000..90dcdbb92b4
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR27754/module.modulemap
@@ -0,0 +1,3 @@
+module "RConversionRuleParser.h" { header "RConversionRuleParser.h" }
+module "TMetaUtils.h" { header "TMetaUtils.h" }
+module "TSchemaType.h" { header "TSchemaType.h" }
diff --git a/clang/test/Modules/pr27754.cpp b/clang/test/Modules/pr27754.cpp
new file mode 100644
index 00000000000..04825954294
--- /dev/null
+++ b/clang/test/Modules/pr27754.cpp
@@ -0,0 +1,7 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -std=c++11 -I%S/Inputs/PR27754 -verify %s
+// RUN: %clang_cc1 -std=c++11 -fmodules -fmodule-map-file=%S/Inputs/PR27754/module.modulemap -fmodules-cache-path=%t -I%S/Inputs/PR27754/ -verify %s
+
+#include "TMetaUtils.h"
+
+// expected-no-diagnostics
OpenPOWER on IntegriCloud