diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-06-30 01:28:56 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-06-30 01:28:56 +0000 |
| commit | 9ba0fec83e7f2eb76cbe53c899126a69827fa78d (patch) | |
| tree | 72acb0a28b854a9e0f43ecd9365b388255f7e02f /clang/test | |
| parent | a5cb3893378f7ea78bc8c9bd727809b0976207aa (diff) | |
| download | bcm5719-llvm-9ba0fec83e7f2eb76cbe53c899126a69827fa78d.tar.gz bcm5719-llvm-9ba0fec83e7f2eb76cbe53c899126a69827fa78d.zip | |
Rework parsing of pure-specifiers. Perform the grammar matching and
disambiguation in the parser rather than trying to do it in Sema.
llvm-svn: 241032
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaCXX/virtuals.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/virtuals.cpp b/clang/test/SemaCXX/virtuals.cpp index 6b8231d4e1e..f8180745bd3 100644 --- a/clang/test/SemaCXX/virtuals.cpp +++ b/clang/test/SemaCXX/virtuals.cpp @@ -51,3 +51,13 @@ namespace pr8264 { virtual virtual void func(); // expected-warning {{duplicate 'virtual' declaration specifier}} }; } + +namespace VirtualFriend { + // DR (filed but no number yet): reject meaningless pure-specifier on a friend declaration. + struct A { virtual int f(); }; + struct B { friend int A::f() = 0; }; // expected-error {{friend declaration cannot have a pure-specifier}} + struct C { + virtual int f(); + friend int C::f() = 0; // expected-error {{friend declaration cannot have a pure-specifier}} + }; +} |

