xref: /aosp_15_r20/external/clang/test/SemaCXX/switch-0x.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2 
3 // PR5518
4 struct A {
5   explicit operator int(); // expected-note{{conversion to integral type}}
6 };
7 
x()8 void x() {
9   switch(A()) { // expected-error{{explicit conversion to}}
10   }
11 }
12