/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Utilities/StaticAnalyzers/test/static_local.cpp
21 строка
608 B
Ivan Razumov
Replace MutableMemberChecker with version that checks access to mutable member via const pointer
04 дек 2024, 17:44
04 дек 2024, 17:44
d01e337
Код
Авторство
О чём код?
#include "FWCore/Utilities/interface/thread_safety_macros.h" class Foo { public: void bar() { // will produce a warning by StaticLocalChecker CMS_THREAD_SAFE static int evilStaticLocal = 0; static int& intRef = evilStaticLocal; static int* intPtr = &evilStaticLocal; // no warnings here static const int c_evilStaticLocal = 0; static int const& c_intRef = evilStaticLocal; static int const* c_intPtr = &evilStaticLocal; static const int* c_intPtr_equivalent = &evilStaticLocal; static int const* const* c_intPtrPtr = &(c_intPtr); } }; int main() { return 0; }