[Bf-blender-cvs] [ad6e63cb96a] master: Cleanup: enable Clang-Tidy `bugprone-parent-virtual-call` rule
Sybren A. Stüvel
noreply at git.blender.org
Fri Aug 7 17:59:28 CEST 2020
Commit: ad6e63cb96a497721d7ad6aeb5cf119d3264036c
Author: Sybren A. Stüvel
Date: Fri Aug 7 17:59:12 2020 +0200
Branches: master
https://developer.blender.org/rBad6e63cb96a497721d7ad6aeb5cf119d3264036c
Cleanup: enable Clang-Tidy `bugprone-parent-virtual-call` rule
I added a single `NOLINT` exception with explanation.
No functional changes.
===================================================================
M .clang-tidy
M source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp
===================================================================
diff --git a/.clang-tidy b/.clang-tidy
index 1f3a05e22d4..3f24e7718e2 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -31,7 +31,6 @@ Checks: >
-bugprone-sizeof-expression,
-bugprone-integer-division,
-bugprone-incorrect-roundings,
- -bugprone-parent-virtual-call,
-bugprone-copy-constructor-init,
WarningsAsErrors: '*'
diff --git a/source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp b/source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp
index 9e83527acad..e8e21d37d00 100644
--- a/source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp
+++ b/source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp
@@ -27,7 +27,9 @@ namespace Freestyle {
void OrientedLineRep::accept(SceneVisitor &v)
{
- Rep::accept(v);
+ Rep::accept(v); // NOLINT(bugprone-parent-virtual-call), this seems to intentionally *not* call
+ // the parent class' accept() function, but rather the grandparent's. The
+ // v.visitLineRep(*this); call below is actually what the parent class would do.
if (!frs_material()) {
v.visitOrientedLineRep(*this);
}
More information about the Bf-blender-cvs
mailing list