clang-analyzer-alpha.unix.PthreadLock check missing from clang-tidy version 3.8 and 4.0?

£可爱£侵袭症+ 提交于 2019-12-12 02:33:07

问题


I am trying to modernize my module's C++ source code using clang-tidy. A few weeks ago, I downloaded and built clang and clang tools version 3.9 and when I ran it on one of my cpp files I got clang-analyzer-alpha.unix.PthreadLock saying that lock has already been taken.

Later, because of space constraints I removed that version of clang and used version 3.8 and 4.0 available in our 3rd party repos.

In both of these versions, I did not get any warnings regarding this alpha check. How do I enable it in version 4.0 ?

I am already using -checks=* while analyzing/running clang-tidy on my cpp file.


回答1:


It looks like there's no way to enable those checks without building clang-tidy yourself: https://reviews.llvm.org/D28729#646548.



来源:https://stackoverflow.com/questions/39200539/clang-analyzer-alpha-unix-pthreadlock-check-missing-from-clang-tidy-version-3-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!