diff options
author | Michael Han <Michael.Han@autodesk.com> | 2012-11-28 23:17:40 +0000 |
---|---|---|
committer | Michael Han <Michael.Han@autodesk.com> | 2012-11-28 23:17:40 +0000 |
commit | 52b501cd723d56efe3ad2ab708c2b75530fe6caa (patch) | |
tree | f1bbfb03898dbaf7cef1687e2d22233e325e3ff2 /test/Parser | |
parent | b15c8984ea300624fbbde385d3907667ce1043fa (diff) |
Implement C++11 [dcl.attr.grammar] p4: If an attribute-specifier-seq appertains to a friend declaration, that declaration shall be a definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser')
-rw-r--r-- | test/Parser/cxx0x-attributes.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/Parser/cxx0x-attributes.cpp b/test/Parser/cxx0x-attributes.cpp index 54baaedfd3..90e73004f6 100644 --- a/test/Parser/cxx0x-attributes.cpp +++ b/test/Parser/cxx0x-attributes.cpp @@ -151,10 +151,16 @@ enum struct [[]] E5; struct S { friend int f [[]] (); // expected-FIXME{{an attribute list cannot appear here}} - [[]] friend int g(); // expected-FIXME{{an attribute list cannot appear here}} + friend int f1 [[noreturn]] (); //expected-error{{an attribute list cannot appear here}} + friend int f2 [[]] [[noreturn]] () {} + [[]] friend int g(); // expected-error{{an attribute list cannot appear here}} [[]] friend int h() { } + [[]] friend int f3(), f4(), f5(); // expected-error{{an attribute list cannot appear here}} + friend int f6 [[noreturn]] (), f7 [[noreturn]] (), f8 [[noreturn]] (); // expected-error3 {{an attribute list cannot appear here}} friend class [[]] C; // expected-error{{an attribute list cannot appear here}} + [[]] friend class D; // expected-error{{an attribute list cannot appear here}} + [[]] friend int; // expected-error{{an attribute list cannot appear here}} }; template<typename T> void tmpl(T) {} template void tmpl [[]] (int); // expected-FIXME {{an attribute list cannot appear here}} |