[clang-tidy] Add spuriously-wake-up-functions check
Summary:
According to
https://wiki.sei.cmu.edu/confluence/display/cplusplus/CON54-CPP.+Wrap+functions+that+can+spuriously+wake+up+in+a+loop
and
https://wiki.sei.cmu.edu/confluence/display/c/CON36-C.+Wrap+functions+that+can+spuriously+wake+up+in+a+loop
misc-spuriously-wake-up-functions check is created. The check finds
`cnd_wait` or `wait` function calls in an `IfStmt` and warns the user to
replace it with a `WhileStmt` or use it with a lambda parameter.
Reviewers: aaron.ballman, alexfh, hokein, jfb, Charusso
Reviewed By: aaron.ballman
Subscribers: sylvestre.ledru, whisperity, Eugene.Zelenko, mgorny, dexonsmith, cfe-commits, gerazo, xazax.hun, steakhal, Charusso
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D70876
2020-03-21 19:02:00 +08:00
|
|
|
.. title:: clang-tidy - cert-con54-cpp
|
|
|
|
.. meta::
|
2020-03-21 19:29:39 +08:00
|
|
|
:http-equiv=refresh: 5;URL=bugprone-spuriously-wake-up-functions.html
|
2020-09-08 20:38:16 +08:00
|
|
|
|
[clang-tidy] Add spuriously-wake-up-functions check
Summary:
According to
https://wiki.sei.cmu.edu/confluence/display/cplusplus/CON54-CPP.+Wrap+functions+that+can+spuriously+wake+up+in+a+loop
and
https://wiki.sei.cmu.edu/confluence/display/c/CON36-C.+Wrap+functions+that+can+spuriously+wake+up+in+a+loop
misc-spuriously-wake-up-functions check is created. The check finds
`cnd_wait` or `wait` function calls in an `IfStmt` and warns the user to
replace it with a `WhileStmt` or use it with a lambda parameter.
Reviewers: aaron.ballman, alexfh, hokein, jfb, Charusso
Reviewed By: aaron.ballman
Subscribers: sylvestre.ledru, whisperity, Eugene.Zelenko, mgorny, dexonsmith, cfe-commits, gerazo, xazax.hun, steakhal, Charusso
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D70876
2020-03-21 19:02:00 +08:00
|
|
|
cert-con54-cpp
|
|
|
|
==============
|
|
|
|
|
|
|
|
The cert-con54-cpp check is an alias, please see
|
2020-09-08 20:38:16 +08:00
|
|
|
`bugprone-spuriously-wake-up-functions <bugprone-spuriously-wake-up-functions.html>`_
|
[clang-tidy] Add spuriously-wake-up-functions check
Summary:
According to
https://wiki.sei.cmu.edu/confluence/display/cplusplus/CON54-CPP.+Wrap+functions+that+can+spuriously+wake+up+in+a+loop
and
https://wiki.sei.cmu.edu/confluence/display/c/CON36-C.+Wrap+functions+that+can+spuriously+wake+up+in+a+loop
misc-spuriously-wake-up-functions check is created. The check finds
`cnd_wait` or `wait` function calls in an `IfStmt` and warns the user to
replace it with a `WhileStmt` or use it with a lambda parameter.
Reviewers: aaron.ballman, alexfh, hokein, jfb, Charusso
Reviewed By: aaron.ballman
Subscribers: sylvestre.ledru, whisperity, Eugene.Zelenko, mgorny, dexonsmith, cfe-commits, gerazo, xazax.hun, steakhal, Charusso
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D70876
2020-03-21 19:02:00 +08:00
|
|
|
for more information.
|