aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx0x-decl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-11-15 22:54:20 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-11-15 22:54:20 +0000
commit6f9a445760992a6fbff2c0b08becf35ae9eafa71 (patch)
tree7dbf7f92a976e820410f2f3d1c8f6e93e257c6b3 /test/Parser/cxx0x-decl.cpp
parentf0024960d5f9edc5728128b49cb758e689dd3746 (diff)
PR9903: Recover from a member functon declared with the 'typedef' specifier by
dropping the specifier, just like we do for non-member functions and function templates declared 'typedef'. Patch by Brian Brooks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx0x-decl.cpp')
-rw-r--r--test/Parser/cxx0x-decl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Parser/cxx0x-decl.cpp b/test/Parser/cxx0x-decl.cpp
index 3af73f95c7..3b883dc76c 100644
--- a/test/Parser/cxx0x-decl.cpp
+++ b/test/Parser/cxx0x-decl.cpp
@@ -34,3 +34,8 @@ struct MultiCV {
};
static_assert(something, ""); // expected-error {{undeclared identifier}}
+
+// PR9903
+struct SS {
+ typedef void d() = default; // expected-error {{function definition declared 'typedef'}} expected-error {{only special member functions may be defaulted}}
+};