New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 776636 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Missing "override" keyword not always caught by the chromium style clang plugin

Project Member Reported by w...@chromium.org, Oct 20 2017

Issue description

Running the clang-tidy modernize-use-override check finds instances of missing "override" keywords that our chromium style plugin should have caught. Here's a list of instances in //content/renderer: https://chromium-review.googlesource.com/c/chromium/src/+/727386

thakis@: could you help find a component/owner for this please?
 

Comment 1 by dcheng@chromium.org, Oct 20 2017

Components: Internals
Labels: clang
Owner: dcheng@chromium.org

Comment 2 by dcheng@chromium.org, Oct 20 2017

Status: Assigned (was: Untriaged)
Not sure how soon I'll be able to poke at this, but definitely seems buggy.

Comment 3 by dcheng@chromium.org, Oct 23 2017

OK I think I understand what's going on. We avoid emitting this check for things that we believe to be gmock objects. All the objects where checks are being skipped contain mocked-out method overrides, which we explicitly skip virtual checks for: https://cs.chromium.org/chromium/src/tools/clang/plugins/FindBadConstructsConsumer.cpp?rcl=778426a57df0f89eaa432f417b6ed8d94ff45448&l=501

One simple way to improve this situation is to still check destructors, but skip everything else.

The more complex solution is to improve the logic for skipping methods defined by Gmock macros, using something similar to what we used for rewriting Blink to Chrome style: https://cs.chromium.org/chromium/src/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp

Sign in to add a comment