Index: lib/StaticAnalyzer/Core/ExprEngineC.cpp =================================================================== --- lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -530,7 +530,7 @@ const Expr *Init = CL->getInitializer(); SVal V = State->getSVal(CL->getInitializer(), LCtx); - if (isa(Init)) { + if (isa(Init) || isa(Init)) { // No work needed. Just pass the value up to this expression. } else { assert(isa(Init)); Index: test/Analysis/initializer.cpp =================================================================== --- test/Analysis/initializer.cpp +++ test/Analysis/initializer.cpp @@ -211,7 +211,7 @@ struct C { C(std::initializer_list list); }; -void foo() { +void testPointerEscapeIntoLists() { C empty{}; // no-crash // Do not warn that 'x' leaks. It might have been deleted by @@ -219,4 +219,8 @@ int *x = new int; C c{x}; // no-warning } + +void testPassListsWithExplicitConstructors() { + (void)(std::initializer_list){12}; // no-crash +} }