From c72c57c9e9b69944e3e009cd5e209634839581d3 Mon Sep 17 00:00:00 2001
From: dim <dim@FreeBSD.org>
Date: Mon, 8 Apr 2013 18:45:10 +0000
Subject: Vendor import of clang trunk r178860:
 http://llvm.org/svn/llvm-project/cfe/trunk@178860

---
 test/SemaCXX/cxx0x-defaulted-functions.cpp | 41 +++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

(limited to 'test/SemaCXX/cxx0x-defaulted-functions.cpp')

diff --git a/test/SemaCXX/cxx0x-defaulted-functions.cpp b/test/SemaCXX/cxx0x-defaulted-functions.cpp
index ce7ee67..bc03bcd 100644
--- a/test/SemaCXX/cxx0x-defaulted-functions.cpp
+++ b/test/SemaCXX/cxx0x-defaulted-functions.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -fcxx-exceptions %s
 
 void fn() = default; // expected-error {{only special member}}
 struct foo {
@@ -149,3 +149,42 @@ namespace PR13527 {
   Y &Y::operator=(Y&&) = default; // expected-error {{definition of explicitly defaulted}}
   Y::~Y() = default; // expected-error {{definition of explicitly defaulted}}
 }
+
+namespace PR14577 {
+  template<typename T>
+  struct Outer {
+    template<typename U>
+    struct Inner1 {
+      ~Inner1();
+    };
+
+    template<typename U>
+    struct Inner2 {
+      ~Inner2();
+    };
+  };
+
+  template<typename T>
+  Outer<T>::Inner1<T>::~Inner1() = delete; // expected-error {{nested name specifier 'Outer<T>::Inner1<T>::' for declaration does not refer into a class, class template or class template partial specialization}}  expected-error {{only functions can have deleted definitions}}
+
+  template<typename T>
+  Outer<T>::Inner2<T>::~Inner2() = default; // expected-error {{nested name specifier 'Outer<T>::Inner2<T>::' for declaration does not refer into a class, class template or class template partial specialization}}  expected-error {{only special member functions may be defaulted}}
+}
+
+extern "C" {
+ template<typename _Tp> // expected-error {{templates must have C++ linkage}}
+ void PR13573(const _Tp&) = delete; // expected-error {{only functions can have deleted definitions}}
+}
+
+namespace PR15597 {
+  template<typename T> struct A {
+    A() noexcept(true) = default;
+    ~A() noexcept(true) = default;
+  };
+  template<typename T> struct B {
+    B() noexcept(false) = default; // expected-error {{does not match the calculated one}}
+    ~B() noexcept(false) = default; // expected-error {{does not match the calculated one}}
+  };
+  A<int> a;
+  B<int> b; // expected-note {{here}}
+}
-- 
cgit v1.1