[PATCH] D44295: Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods
Malcolm Parsons via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 9 09:24:05 PST 2018
malcolm.parsons added inline comments.
================
Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:152
+ Member->getQualifierLoc().getSourceRange(),
+ GetNameAsString(*(Parents.front())) + "::");
+ }
----------------
What does this do for templated parent classes?
================
Comment at: docs/clang-tidy/checks/bugprone-parent-virtual-call.rst:6
+
+FIXME: Describe what patterns does the check detect and why. Give examples.
----------------
FIXME.
================
Comment at: test/clang-tidy/bugprone-parent-virtual-call.cpp:102
+ // CHECK-MESSAGES: :[[@LINE-1]]:34: warning: 'AA::virt_1' is a grand-parent's method, not parent's. Did you mean 'BB_1' or 'BB_2'? [bugprone-parent-virtual-call]
+ // No fix available due to multiple choise of parent class.
+};
----------------
typo: choice
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44295
More information about the cfe-commits
mailing list