[llvm-dev] [clang-tidy][RFC] checks concurrency-async-{blocking, fs, no-new-threads}

Vasily Kulikov via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 28 08:02:58 PST 2021


Hi,

On 27.01.2021 21:45, Vasily Kulikov wrote:
> Hm, the attribute sounds interesting. And if it becomes widespread, it could be 
> proposed for the next standard...
While I agree that the current approach with naive blacklists suffer from "you 
have to explicitly mark all bad functions/types" issue in general, I think it 
still has some non-zero limited value. If you don't develop with WinAPI32, 
OpenGL, or Qt, but with Boost, POSIX and std (e.g. pretty many backend 
projects), the extra steps you have to do by yourself are rather simple (if 
any). Blacklists of widespread libraries can be compiled and added into upstream 
clang-tidy by other volunteers.

The patches fit our environment in Yandex.Taxi, might fit others too. I'm not 
sure whether I'm the right person to implement a check with ideologically better 
architecture. If merge BL code, it would not complicate things for the better 
architecture or significantly reduce motivation for invention, it can be 
implemented on top of it. If/when a more precise check is implemented (with 
attributes, or some heuristics), BL tidy check can be deprecated with a 
suggestion to use the new better tool.

So, I suggest to split the problem into two:
1) merge current PRs
2) someday come to a better solution

What do you say?


More information about the llvm-dev mailing list