xref: /llvm-project/clang/test/Misc/explicit.cpp (revision fe86dbb32da21e1c8c6eb4864a00f61ed3d003a3)
1 // RUN: %clang_cc1 -std=c++20 %s -verify
2 
foo()3 int foo ()  {
4   int b;
5   explicit( && b );  // expected-error{{conversion from 'void *' to 'bool' is not allowed in a converted constant expression}}
6                      // expected-error@-1{{'explicit' can only appear on non-static member functions}}
7                      // expected-error@-2{{use of undeclared label 'b'}}
8                      // expected-warning@-3{{declaration does not declare anything}}
9 }
10