diff options
| author | John McCall <rjmccall@apple.com> | 2010-01-08 04:41:39 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-01-08 04:41:39 +0000 |
| commit | 12f97bc48ad403d4cc80476164a6fa20fa043d31 (patch) | |
| tree | 2ab4efb0af0ef3d2eeba33b991be06affbc97cf9 /clang/test | |
| parent | 58ec4fec88541e06d518a26bd47f26a42d20644b (diff) | |
| download | bcm5719-llvm-12f97bc48ad403d4cc80476164a6fa20fa043d31.tar.gz bcm5719-llvm-12f97bc48ad403d4cc80476164a6fa20fa043d31.zip | |
Change the printing of OR_Deleted overload results to print all the candidates,
not just the viable ones. This is reasonable because the most common use of
deleted functions is to exclude some implicit conversion during calls; users
therefore will want to figure out why some other options were excluded.
Started sorting overload results. Right now it just sorts by location in the
translation unit (after putting viable functions first), but we can do better than
that.
Changed bool OnlyViable parameter to PrintOverloadCandidates to an enum for better
self-documentation.
llvm-svn: 92990
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Sema/overloadable.c | 6 | ||||
| -rw-r--r-- | clang/test/SemaCXX/attr-unavailable.cpp | 4 | ||||
| -rw-r--r-- | clang/test/SemaCXX/rval-references.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/Sema/overloadable.c b/clang/test/Sema/overloadable.c index 72d3673c825..ff631ed9c85 100644 --- a/clang/test/Sema/overloadable.c +++ b/clang/test/Sema/overloadable.c @@ -37,9 +37,9 @@ void test_struct(struct X x, struct Y y) { double *f(int) __attribute__((overloadable)); // expected-error{{conflicting types for 'f'}} -double promote(float) __attribute__((__overloadable__)); -double promote(double) __attribute__((__overloadable__)); -long double promote(long double) __attribute__((__overloadable__)); +double promote(float) __attribute__((__overloadable__)); // expected-note {{candidate}} +double promote(double) __attribute__((__overloadable__)); // expected-note {{candidate}} +long double promote(long double) __attribute__((__overloadable__)); // expected-note {{candidate}} void promote() __attribute__((__overloadable__)); // expected-error{{'overloadable' function 'promote' must have a prototype}} void promote(...) __attribute__((__overloadable__, __unavailable__)); // \ diff --git a/clang/test/SemaCXX/attr-unavailable.cpp b/clang/test/SemaCXX/attr-unavailable.cpp index bebd4cb18e5..8b381dfe4b2 100644 --- a/clang/test/SemaCXX/attr-unavailable.cpp +++ b/clang/test/SemaCXX/attr-unavailable.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -int &foo(int); -double &foo(double); +int &foo(int); // expected-note {{candidate}} +double &foo(double); // expected-note {{candidate}} void foo(...) __attribute__((__unavailable__)); // expected-note {{candidate function}} \ // expected-note{{function has been explicitly marked unavailable here}} diff --git a/clang/test/SemaCXX/rval-references.cpp b/clang/test/SemaCXX/rval-references.cpp index 1cde26352a6..2a7fb25c62a 100644 --- a/clang/test/SemaCXX/rval-references.cpp +++ b/clang/test/SemaCXX/rval-references.cpp @@ -65,7 +65,7 @@ int&& should_not_warn(int&& i) { // But GCC 4.4 does // Test the return dance. This also tests IsReturnCopyElidable. struct MoveOnly { MoveOnly(); - MoveOnly(const MoveOnly&) = delete; // expected-note {{candidate function}} \ + MoveOnly(const MoveOnly&) = delete; // expected-note {{candidate constructor}} \ // expected-note 3{{explicitly marked deleted here}} MoveOnly(MoveOnly&&); // expected-note {{candidate constructor}} MoveOnly(int&&); // expected-note {{candidate constructor}} |

