PR44540: Prefer an inherited default constructor over an initializer
authorRichard Smith <richard@metafoo.co.uk>
Wed, 15 Jan 2020 03:29:50 +0000 (19:29 -0800)
committerRichard Smith <richard@metafoo.co.uk>
Wed, 15 Jan 2020 03:29:50 +0000 (19:29 -0800)
commit1b5404aff37953ce4c10191d04872ed7c2dc6548
tree89d398bdadb280965687925d21dcb98b288064b8
parentc6e69880ae4d9ce4d27bf046292a0a20c3ab3540
PR44540: Prefer an inherited default constructor over an initializer
list constructor when initializing from {}.

We would previously pick between calling an initializer list constructor
and calling a default constructor unstably in this situation, depending
on whether the inherited default constructor had already been used
elsewhere in the program.
clang/lib/AST/DeclCXX.cpp
clang/lib/Sema/SemaInit.cpp
clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp