]> git.eshelyaron.com Git - emacs.git/commitdiff
semantic/bovine/c: Parse C++ override/final correctly
authorRamkumar Ramachandra <artagnon@gmail.com>
Sat, 17 Jan 2015 22:43:57 +0000 (17:43 -0500)
committerEdward John Steere <edward.steere@gmail.com>
Wed, 25 Jan 2017 17:28:21 +0000 (19:28 +0200)
override and final are a perfectly good opt-post-fcn-modifiers in
C++. Parse them correctly.  (Tiny change)

* semantic/bovine/c.by (post-fcn-modifiers): Add tokens OVERRIDE and
  FINAL.

* semantic/bovine/c.el (semantic-c-reconstitute-token): Add
  :override-flag and :final-flag.

test/manual/cedet/cedet/semantic/tests/test.cpp

index 04b7df7c0a68f06a2245729b8b68cdd45fe3ae7f..21746b7ed194d742099f27f88548c10fd63e30e0 100644 (file)
@@ -161,6 +161,18 @@ void *class3::method5_for_class3( int a, int b) const
 {
 }
 
+void *class3::method6_for_class3( int a, int b) override
+{
+  int q = a;
+  return "Moose";
+}
+
+void *class3::method7_for_class3( int a, int b) final
+{
+  int q = a;
+  return "Moose";
+}
+
 /*
  * Namespace parsing tests
  */