summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/convert-to-bool.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-04 00:32:51 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-04 00:32:51 +0000
commite254f90d94e3294470b055e3851d636333e3467c (patch)
tree40abda5f13c55af26120e1a54173929d33723423 /clang/test/SemaCXX/convert-to-bool.cpp
parent3d9296e6f552cceb73dae277f56bac3127a44759 (diff)
downloadbcm5719-llvm-e254f90d94e3294470b055e3851d636333e3467c.tar.gz
bcm5719-llvm-e254f90d94e3294470b055e3851d636333e3467c.zip
Initial implementation of argument dependent lookup (a.k.a. ADL,
a.k.a. Koenig lookup) in C++. Most of the pieces are in place, but for two: - In an unqualified call g(x), even if the name does not refer to anything in the current scope, we can still find functions named "g" based on ADL. We don't yet have this ability. - ADL will need updating for friend functions and templates. llvm-svn: 63692
Diffstat (limited to 'clang/test/SemaCXX/convert-to-bool.cpp')
-rw-r--r--clang/test/SemaCXX/convert-to-bool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/convert-to-bool.cpp b/clang/test/SemaCXX/convert-to-bool.cpp
index 1b57214d086..100267c17f7 100644
--- a/clang/test/SemaCXX/convert-to-bool.cpp
+++ b/clang/test/SemaCXX/convert-to-bool.cpp
@@ -36,7 +36,7 @@ void test_conv_to_bool(ConvToBool ctb, ConvToInt cti, ExplicitConvToBool ecb) {
bool b3 = ctb || ecb;
}
-void accepts_bool(bool) { }
+void accepts_bool(bool) { } // expected-note{{candidate function}}
struct ExplicitConvToRef {
explicit operator int&(); // expected-warning{{explicit conversion functions are a C++0x extension}}
@@ -45,7 +45,7 @@ struct ExplicitConvToRef {
void test_explicit_bool(ExplicitConvToBool ecb) {
bool b1(ecb); // okay
bool b2 = ecb; // expected-error{{incompatible type initializing 'struct ExplicitConvToBool', expected '_Bool'}}
- accepts_bool(ecb); // expected-error{{incompatible type passing 'struct ExplicitConvToBool', expected '_Bool'}}
+ accepts_bool(ecb); // expected-error{{no matching function for call to}}
}
void test_explicit_conv_to_ref(ExplicitConvToRef ecr) {
OpenPOWER on IntegriCloud