]> granicus.if.org Git - clang/commit
In C++, when initializing an array from a pascal string, it's OK if the array
authorAnders Carlsson <andersca@mac.com>
Thu, 14 Apr 2011 00:41:11 +0000 (00:41 +0000)
committerAnders Carlsson <andersca@mac.com>
Thu, 14 Apr 2011 00:41:11 +0000 (00:41 +0000)
commitb8fc45f8d0fdcc7908590115942d425bf4a924f1
tree6fce29d2c5f4a58558dd13cd9ab306e9f84d17ea
parent3e2193ce5feb2feb092e5ae615e85148e06e9fd2
In C++, when initializing an array from a pascal string, it's OK if the array
is 1 element smaller than the string, because we can just strip off the last
null character. This matches GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129490 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaInit.cpp
test/SemaCXX/pascal-strings.cpp