]> granicus.if.org Git - clang/commit
[VLA] Handle VLA size expression in a full-expression context.
authorTim Shen <timshen91@gmail.com>
Tue, 14 Feb 2017 23:46:37 +0000 (23:46 +0000)
committerTim Shen <timshen91@gmail.com>
Tue, 14 Feb 2017 23:46:37 +0000 (23:46 +0000)
commite41ecb53e272474f548b3db7793585aaa361ea64
tree348605d2a5d72f1e45fd3490bf1b755c2ac23cdb
parent47f0b411712cd64eacabed27424fa1c2a57a9ccd
[VLA] Handle VLA size expression in a full-expression context.

Summary: Previously the cleanups (e.g. dtor calls) are inserted into the
outer scope (e.g. function body scope), instead of it's own scope. After
the fix, the cleanups are inserted right after getting the size value.

This fixes pr30306.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D24333

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295123 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplateInstantiateDecl.cpp
lib/Sema/TreeTransform.h
test/Sema/pr30306.cpp [new file with mode: 0644]