]> granicus.if.org Git - clang/commitdiff
Move test/Sema/return.cpp into test/SemaCXX/return.cpp
authorHans Wennborg <hans@hanshq.net>
Thu, 30 Jun 2011 17:20:18 +0000 (17:20 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 30 Jun 2011 17:20:18 +0000 (17:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134171 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/return.cpp [deleted file]
test/SemaCXX/return.cpp

diff --git a/test/Sema/return.cpp b/test/Sema/return.cpp
deleted file mode 100644 (file)
index 754bc98..0000000
+++ /dev/null
@@ -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}}
-  }
-};
index b457f6ace55aab8c85454abec3ea1176d7be8c4c..2f98a277f6385b741d3ebe2f3f2fdf144d68fc8a 100644 (file)
@@ -69,3 +69,14 @@ namespace PR10057 {
     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}}
+    }
+  };
+}