================
@@ -117,6 +120,16 @@ bool isAbstract(const Decl *D) {
}
// Indicates whether declaration D is virtual in cases where D is a method.
+// We want to treat a method as virtual if it is declared virtual, even if it
+// is not implemented in this class, or if it overrides/implements a
+// base-class method. This is because the "virtual" modifier is still relevant
+// to the method's behavior and how it should be highlighted, even if it is
+// not itself a virtual method in the strictest sense. For example, a method
+// that overrides a virtual method from a base class is still considered
+// virtual, even if it is not declared as such in the derived class.
+// Similarly, a method that implements a pure virtual method from a base class
+// is also considered virtual, even if it is not declared as such in the
+// derived class.
----------------
ratzdi wrote:
done.
https://github.com/llvm/llvm-project/pull/170103
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits