aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/PR22637.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/PR22637.cpp')
-rw-r--r--test/SemaCXX/PR22637.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/SemaCXX/PR22637.cpp b/test/SemaCXX/PR22637.cpp
new file mode 100644
index 000000000000..1a9bf1df43c5
--- /dev/null
+++ b/test/SemaCXX/PR22637.cpp
@@ -0,0 +1,40 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// expected-no-diagnostics
+
+void check(int&) = delete;
+void check(int const&) { }
+
+template <typename>
+struct A {
+ union {
+ int b;
+ };
+ struct {
+ int c;
+ };
+ union {
+ struct {
+ union {
+ struct {
+ struct {
+ int d;
+ };
+ };
+ };
+ };
+ };
+ int e;
+ void foo() const {
+ check(b);
+ check(c);
+ check(d);
+ check(d);
+ check(e);
+ }
+};
+
+int main(){
+ A<int> a;
+ a.foo();
+}