New issue
Advanced search Search tips

Issue 701694 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Clang plugin doesn't require auto* for function pointers

Project Member Reported by dcheng@chromium.org, Mar 15 2017

Issue description

I think: I'm on my phone but it looks like https://codereview.chromium.org/2744043003/ passed the win clang bot.

The code in question is AreSearchFlagsAvailable in https://codereview.chromium.org/2744043003/diff/200001/base/native_library_win.cc
 

Comment 1 by vmp...@chromium.org, Mar 24 2017

This is somewhat intentional from https://cs.chromium.org/chromium/src/tools/clang/plugins/FindBadConstructsConsumer.cpp?q=findbadconstructsconsumer.cpp&sq=package:chromium&dr&l=997

My reasoning for this was that I don't think it's that useful to force auto* for function pointers, since then interchanging lambdas/std::function/function pointers becomes a pain.

Do you think we should enforce this on function pointers as well?

Comment 2 by dcheng@chromium.org, Mar 24 2017

I don't feel strongly about this, and the argument about making lambda / function pointer shenanigans harder to follow is valid.

Though I wonder if there's any circumstance where we'd want to make explicit copies of lambdas/std::function clear?
Status: Assigned (was: Untriaged)

Sign in to add a comment