Suppose you have the following code:
double g_params[MAX_PARAMS]{};
static const double &LAMBDA{g_params[0]};
cppcoreguidelines-interfaces-global-init is reported for the declaration of LAMBDA, but this is erroneous.
To reproduce:
git clone https://github.com/LegalizeAdulthood/iterated-dynamics.git
git checkout 3f219d4dfce69d8bcab73412d0b261f378a6a239
git submodule init
git submodule update
cmake --preset default
- run clang-tidy on
lorenz.cpp
- false positive reported for lines 1295-1300