diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-23 16:10:32 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-23 16:10:32 +0000 |
commit | 715e9c8a39437347e838aa108df443fe1086d359 (patch) | |
tree | a5236afdb0b40417eb94c714a3e42b376b400465 /test/SemaCXX/c99-variable-length-array.cpp | |
parent | fa037bd3f79d3c70197a3224bb1b29c6c4af0098 (diff) |
Even though we don't unique VLA types, we still need to build a
canonical type where the element type is canonical. Fixes PR7206.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/c99-variable-length-array.cpp')
-rw-r--r-- | test/SemaCXX/c99-variable-length-array.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/c99-variable-length-array.cpp b/test/SemaCXX/c99-variable-length-array.cpp index a792951252..14dc0ae2e8 100644 --- a/test/SemaCXX/c99-variable-length-array.cpp +++ b/test/SemaCXX/c99-variable-length-array.cpp @@ -78,3 +78,13 @@ void local_classes(int N) { int array[N]; // expected-error{{fields must have a constant size: 'variable length array in structure' extension will never be supported}} }; } + +namespace PR7206 { + void f(int x) { + struct edge_info { + float left; + float right; + }; + struct edge_info edgeInfo[x]; + } +} |