]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r261680:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 12 Feb 2014 07:51:14 +0000 (07:51 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 12 Feb 2014 07:51:14 +0000 (07:51 +0000)
commita99989c7579acac56ac626e4854da76b549ea890
treec53e2e6cbee982e499d7ed65b0bdba18206b5be4
parent079c1ae4a6512c0969ef74013ed1d22710f4248d
MFC r261680:

Pull in r200899 from upstream clang trunk:

  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

This fixes "Assertion failed: (T::isKind(*this)), function castAs"
errors, which can occur when building the security/quantis port.

Reported by: ale

git-svn-id: svn://svn.freebsd.org/base/stable/10@261794 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/llvm/tools/clang/lib/Sema/TreeTransform.h