cpp11-migrate: Add override specifier before comments on inline methods
This commit fixes a "FIXME" in the add-override transform. ' override' was
misplaced when a comment was between the function body and the end of the
'prototype'.
It also remove duplicated check for the main file from the last commit (and
fixes the typo in the comment above).
Author: Guillaume Papin <guillaume.papin@epitech.eu>
llvm-svn: 181806
diff --git a/clang-tools-extra/docs/AddOverrideTransform.rst b/clang-tools-extra/docs/AddOverrideTransform.rst
index 8057f2f..ea537fe 100644
--- a/clang-tools-extra/docs/AddOverrideTransform.rst
+++ b/clang-tools-extra/docs/AddOverrideTransform.rst
@@ -28,20 +28,17 @@
Known Limitations
-----------------
-* This transform will fail if a method declaration has an inlined method
- body and there is a comment between the method declaration and the body.
- In this case, the override keyword will incorrectly be inserted at the
- end of the comment.
+* This transform will not insert the override keyword if a method is
+ pure. At the moment it's not possible to track down the pure
+ specifier location.
.. code-block:: c++
class B : public A {
public:
- virtual void h() const // comment
- { }
+ virtual void h() const = 0;
- // The declaration of h is transformed to
- virtual void h() const // comment override
- { }
+ // The declaration of h is NOT transformed to
+ virtual void h() const override = 0;
};