]> granicus.if.org Git - clang/commit
[analyzer] pr34766: Fix a crash on explicit std::initializer_list constructor.
authorArtem Dergachev <artem.dergachev@gmail.com>
Mon, 27 Nov 2017 17:37:09 +0000 (17:37 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Mon, 27 Nov 2017 17:37:09 +0000 (17:37 +0000)
commit0dca9cdd99ab667dbc8d28d7e3eddd7d658d52f6
tree4edc2b922282133ea9d341543b1c146a0cda43b7
parent37d08be31c190321aab5b8d192d2401a58a5938a
[analyzer] pr34766: Fix a crash on explicit std::initializer_list constructor.

We didn't support the following syntax:

  (std::initializer_list<int>){12}

which suddenly produces CompoundLiteralExpr that contains
CXXStdInitializerListExpr.

Lift the assertion and instead pass the value through CompoundLiteralExpr
transparently, as it doesn't add much.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319058 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngineC.cpp
test/Analysis/initializer.cpp