summaryrefslogtreecommitdiff
path: root/clang/test/SemaTemplate/member-inclass-init-value-dependent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaTemplate/member-inclass-init-value-dependent.cpp')
-rw-r--r--clang/test/SemaTemplate/member-inclass-init-value-dependent.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/member-inclass-init-value-dependent.cpp b/clang/test/SemaTemplate/member-inclass-init-value-dependent.cpp
new file mode 100644
index 0000000..5bff7f2
--- /dev/null
+++ b/clang/test/SemaTemplate/member-inclass-init-value-dependent.cpp
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -emit-llvm-only %s
+// PR10290
+
+template<int Flags> struct foo {
+ int value = Flags && 0;
+};
+
+void test() {
+ foo<4> bar;
+}
+
+struct S {
+ S(int n);
+};
+template<typename> struct T {
+ S s = 0;
+};
+T<int> t;