https://bugs.llvm.org/show_bug.cgi?id=45012
Bug ID: 45012
Summary: clang accepts a call to an ambiguous inherited
constructor in some cases
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
Assignee: unassignedclangb...@nondot.org
Reporter: richard-l...@metafoo.co.uk
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
Testcase:
struct A { A(int); };
struct B : virtual A { using A::A; };
struct C : A, B { using A::A; using B::B; };
C c(123);
Clang accepts and passes the 123 on to the constructors of both A base
subobjects. This code is ill-formed under [class.inhctor.init]p2:
> If the constructor was inherited from multiple base class subobjects of type
> B, the program is ill-formed.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs