[cfe-commits] r109192 - /cfe/trunk/test/SemaCXX/conversion-function.cpp

John McCall rjmccall at apple.com
Thu Jul 22 15:44:38 PDT 2010


Author: rjmccall
Date: Thu Jul 22 17:44:38 2010
New Revision: 109192

URL: http://llvm.org/viewvc/llvm-project?rev=109192&view=rev
Log:
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.


Modified:
    cfe/trunk/test/SemaCXX/conversion-function.cpp

Modified: cfe/trunk/test/SemaCXX/conversion-function.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/conversion-function.cpp?rev=109192&r1=109191&r2=109192&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/conversion-function.cpp (original)
+++ cfe/trunk/test/SemaCXX/conversion-function.cpp Thu Jul 22 17:44:38 2010
@@ -97,9 +97,7 @@
 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 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 @@
   ~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 {





More information about the cfe-commits mailing list