]> granicus.if.org Git - clang/commitdiff
Add more parser tests for the override control keywords.
authorAnders Carlsson <andersca@mac.com>
Thu, 20 Jan 2011 03:41:12 +0000 (03:41 +0000)
committerAnders Carlsson <andersca@mac.com>
Thu, 20 Jan 2011 03:41:12 +0000 (03:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123875 91177308-0d34-0410-b5e6-96231b3b80d8

test/Parser/cxx0x-override-control-keywords.cpp

index 564362176448de9d4183b0d85618df126bda7328..04cf74e4f53f748d5b4171a97277912aea2d1569 100644 (file)
@@ -3,4 +3,11 @@ struct S {
   virtual void final() final;
   virtual void override() override;
   virtual void n() new;
+  int i : 3 new;
+  int j new;
+};
+
+struct T {
+  // virt-specifier-seq is only valid in member-declarators, and a function definition is not a member-declarator.
+  virtual void f() const override { } // expected-error {{expected ';' at end of declaration list}}
 };