[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

Zinovy Nis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 11 13:03:45 PDT 2018


zinovy.nis marked an inline comment as done.
zinovy.nis added inline comments.


================
Comment at: test/clang-tidy/bugprone-parent-virtual-call.cpp:125
+  // CHECK-MESSAGES: :[[@LINE-1]]:34: warning: 'A::virt_1' is a grand-parent's method, not parent's. Did you mean 'BF'?
+  // CHECK-FIXES:  int virt_1() override { return BF::virt_1(); }
+};
----------------
malcolm.parsons wrote:
> Does this fixit compile?
Thanks for pointing. Hope I fixed this case in the latest patch. Please have a look at it.



Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D44295





More information about the cfe-commits mailing list