[cfe-commits] r134171 - in /cfe/trunk/test: Sema/return.cpp SemaCXX/return.cpp

Hans Wennborg hans at hanshq.net
Thu Jun 30 10:20:19 PDT 2011


Author: hans
Date: Thu Jun 30 12:20:18 2011
New Revision: 134171

URL: http://llvm.org/viewvc/llvm-project?rev=134171&view=rev
Log:
Move test/Sema/return.cpp into test/SemaCXX/return.cpp

Removed:
    cfe/trunk/test/Sema/return.cpp
Modified:
    cfe/trunk/test/SemaCXX/return.cpp

Removed: cfe/trunk/test/Sema/return.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/return.cpp?rev=134170&view=auto
==============================================================================
--- cfe/trunk/test/Sema/return.cpp (original)
+++ cfe/trunk/test/Sema/return.cpp (removed)
@@ -1,10 +0,0 @@
-// RUN: %clang %s -fsyntax-only -Wreturn-type
-
-struct C {
-  C() {
-    return 42; // expected-warning {{constructor 'C' should not return a value}}
-  }
-  ~C() {
-    return 42; // expected-warning {{destructor '~C' should not return a value}}
-  }
-};

Modified: cfe/trunk/test/SemaCXX/return.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/return.cpp?rev=134171&r1=134170&r2=134171&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/return.cpp (original)
+++ cfe/trunk/test/SemaCXX/return.cpp Thu Jun 30 12:20:18 2011
@@ -69,3 +69,14 @@
     return S() = value;
   }
 }
+
+namespace return_has_expr {
+  struct S {
+    S() {
+      return 42; // expected-error {{constructor 'S' should not return a value}}
+    }
+    ~S() {
+      return 42; // expected-error {{destructor '~S' should not return a value}}
+    }
+  };
+}





More information about the cfe-commits mailing list