summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/array-to-pointer-decay.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commitbfef399519ca9b8a4b4c6b563253bad7e0eeffe0 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/SemaTemplate/array-to-pointer-decay.cpp
parent6a0372513edbc473b538d2f724efac50405d6fef (diff)
Diffstat (limited to 'test/SemaTemplate/array-to-pointer-decay.cpp')
-rw-r--r--test/SemaTemplate/array-to-pointer-decay.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaTemplate/array-to-pointer-decay.cpp b/test/SemaTemplate/array-to-pointer-decay.cpp
index 26d277d7dc058..dcf0901610408 100644
--- a/test/SemaTemplate/array-to-pointer-decay.cpp
+++ b/test/SemaTemplate/array-to-pointer-decay.cpp
@@ -24,3 +24,15 @@ template <typename Type> static bool sanitize() {
return !c->start;
}
bool closure = sanitize<int>();
+
+// PR16206
+typedef struct {
+ char x[4];
+} chars;
+
+chars getChars();
+void use(char *);
+
+void test() {
+ use(getChars().x);
+}