summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/array-to-pointer-decay.cpp
diff options
context:
space:
mode:
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 26d277d..dcf0901 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);
+}
OpenPOWER on IntegriCloud