summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/ambig-user-defined-conversions.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-01-12 00:44:57 +0000
committerJohn McCall <rjmccall@apple.com>2010-01-12 00:44:57 +0000
commit0d1da2298aaa8a01e7672cba6f4f2151640b5552 (patch)
tree3905bfcca99e5a4a48d53dec57244dec3f6c2495 /clang/test/SemaCXX/ambig-user-defined-conversions.cpp
parent87be3617e3bf6ce34a417d9064649f4b315177a7 (diff)
downloadbcm5719-llvm-0d1da2298aaa8a01e7672cba6f4f2151640b5552.tar.gz
bcm5719-llvm-0d1da2298aaa8a01e7672cba6f4f2151640b5552.zip
Introduce a specific representation for the ambiguous implicit conversion
sequence. Lots of small relevant changes. Fixes some serious problems with ambiguous conversions; also possibly improves associated diagnostics. llvm-svn: 93214
Diffstat (limited to 'clang/test/SemaCXX/ambig-user-defined-conversions.cpp')
-rw-r--r--clang/test/SemaCXX/ambig-user-defined-conversions.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/ambig-user-defined-conversions.cpp b/clang/test/SemaCXX/ambig-user-defined-conversions.cpp
index 8ac822fc08c..5e0a2e3766f 100644
--- a/clang/test/SemaCXX/ambig-user-defined-conversions.cpp
+++ b/clang/test/SemaCXX/ambig-user-defined-conversions.cpp
@@ -21,6 +21,13 @@ namespace test0 {
func(b1, f()); // expected-error {{call to 'func' is ambiguous}}
return f(); // expected-error {{conversion from 'struct test0::B' to 'int const' is ambiguous}}
}
+
+ // This used to crash when comparing the two operands.
+ void func2(const char cc); // expected-note {{candidate function}}
+ void func2(const int ci); // expected-note {{candidate function}}
+ void Test2() {
+ func2(b1); // expected-error {{call to 'func2' is ambiguous}}
+ }
}
namespace test1 {
OpenPOWER on IntegriCloud