summaryrefslogtreecommitdiffstats
path: root/test/CXX/special
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-08-10 16:51:53 +0000
committerDouglas Gregor <dgregor@apple.com>2011-08-10 16:51:53 +0000
commit136da1c4320156fe8924139f58fbeed2e32cc6e8 (patch)
tree07dd43565cc5722075cc6a1b58734a23674ffbb2 /test/CXX/special
parenteaf4fbab08b2636103b2da08412e33baff15ad2a (diff)
When adding the base and member initializers for an implicitly-defined
special member function, make sure to classify an explicitly-defaulted copy constructor as a "copy" operation. Fixes PR10622. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/special')
-rw-r--r--test/CXX/special/class.copy/p15-0x.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CXX/special/class.copy/p15-0x.cpp b/test/CXX/special/class.copy/p15-0x.cpp
new file mode 100644
index 0000000000..42c83d5b4e
--- /dev/null
+++ b/test/CXX/special/class.copy/p15-0x.cpp
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s
+
+namespace PR10622 {
+ struct foo {
+ const int first;
+ foo(const foo&) = default;
+ };
+ void find_or_insert(const foo& __obj) {
+ foo x(__obj);
+ }
+}