]> granicus.if.org Git - clang/commit
Variable auto-init: also auto-init alloca
authorJF Bastien <jfbastien@apple.com>
Fri, 12 Apr 2019 00:11:27 +0000 (00:11 +0000)
committerJF Bastien <jfbastien@apple.com>
Fri, 12 Apr 2019 00:11:27 +0000 (00:11 +0000)
commiteae000b4253d99ee3ce97cdfa6aa31947994661f
treedb02a092d5a5b73601680492bc3abbf474d462e7
parent5b41e92e1e63a49e451c201e09e38ffed031747c
Variable auto-init: also auto-init alloca

Summary:
alloca isn’t auto-init’d right now because it’s a different path in clang that
all the other stuff we support (it’s a builtin, not an expression).
Interestingly, alloca doesn’t have a type (as opposed to even VLA) so we can
really only initialize it with memset.

<rdar://problem/49794007>

Subscribers: jkorous, dexonsmith, cfe-commits, rjmccall, glider, kees, kcc, pcc

Tags: #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358243 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBuiltin.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CMakeLists.txt
lib/CodeGen/PatternInit.cpp [new file with mode: 0644]
lib/CodeGen/PatternInit.h [new file with mode: 0644]
test/CodeGenCXX/trivial-auto-var-init.cpp