clang/test/Misc/explicit.cpp
raw| 1 | // RUN: %clang_cc1 -std=c++20 %s -verify |
| 2 | |
| 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 | } |