]> granicus.if.org Git - clang/commit
[Sema] Don't assume that an initializer list has an initializer
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 10 Apr 2015 04:52:06 +0000 (04:52 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 10 Apr 2015 04:52:06 +0000 (04:52 +0000)
commit9392962ef4382490bf0dc2e2c3b5823608d03931
tree8e1d3175b1b9c9d30d0c8fc2ddfe539ea8d6d305
parenta3a07915ef4d0720f1f841ca825f05b7e458287a
[Sema] Don't assume that an initializer list has an initializer

Given something like 'int({}, 1)', we would try to emit a diagnostic
regarding the excess element in the scalar initializer.  However, we
assumed that the initializer list had an element in it.

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