Skip to content
Commit 774c6d03 authored by Serge Pavlov's avatar Serge Pavlov
Browse files

Allow transformation of VariableArray to ConstantArray.

In the following code:

    struct A { static const int sz; };
    template<class T> void f() { T arr[A::sz]; }

the array 'arr' is represented as a variable size array in the template.
If 'A::sz' gets value below in the translation unit, the array in
instantiation can turn into constant size array.

This change fixes PR18633.

Differential Revision: http://llvm-reviews.chandlerc.com/D2688

llvm-svn: 200899
parent d4612449
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment