diff options
author | John McCall <rjmccall@apple.com> | 2010-07-22 22:44:38 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-07-22 22:44:38 +0000 |
commit | b92caa5aa6f428ab1bf1a71bea5a35e15c309d8c (patch) | |
tree | d22b945956b6f7e8ce421be14eeee005fdcb616c /test/SemaCXX/conversion-function.cpp | |
parent | 577d4796d358c0e72ebaa023113505226ab51b4f (diff) |
Ted pointed out that this test case could be using access control instead of
__attribute__((unavailable)). I've done so, but unfortunately there's still a case
of redundant diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109192 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/conversion-function.cpp')
-rw-r--r-- | test/SemaCXX/conversion-function.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/SemaCXX/conversion-function.cpp b/test/SemaCXX/conversion-function.cpp index 3e96d02495..d7d41a4031 100644 --- a/test/SemaCXX/conversion-function.cpp +++ b/test/SemaCXX/conversion-function.cpp @@ -97,9 +97,7 @@ void f(Yb& a) { class AutoPtrRef { }; class AutoPtr { - // FIXME: Using 'unavailable' since we do not have access control yet. - // FIXME: The error message isn't so good. - AutoPtr(AutoPtr &) __attribute__((unavailable)); // expected-note{{explicitly marked}} + AutoPtr(AutoPtr &); // expected-note{{declared private here}} public: AutoPtr(); @@ -115,7 +113,7 @@ AutoPtr test_auto_ptr(bool Cond) { AutoPtr p; if (Cond) - return p; // expected-error{{call to deleted constructor}} + return p; // expected-error{{calling a private constructor}} return AutoPtr(); } @@ -125,11 +123,12 @@ struct A1 { ~A1(); private: - A1(const A1&) __attribute__((unavailable)); // expected-note{{here}} + A1(const A1&); // expected-note 2 {{declared private here}} }; A1 f() { - return "Hello"; // expected-error{{invokes deleted constructor}} + // FIXME: redundant diagnostics! + return "Hello"; // expected-error {{calling a private constructor}} expected-warning {{an accessible copy constructor}} } namespace source_locations { |