Richard Smith 16d3150852 [c++1z] When initializing a const-qualified class type, don't forget to add on
the requested cv-qualifiers after construction. This usually doesn't matter,
but it does matter within a ?: operator.

llvm-svn: 290227
2016-12-21 01:31:56 +00:00

11 lines
180 B
C++

// RUN: %clang_cc1 -std=c++98 -verify %s
// RUN: %clang_cc1 -std=c++1z -verify %s
// expected-no-diagnostics
struct A { A(); A(int); };
void f() {
const A a;
true ? a : 0;
}