Issue |
123485
|
Summary |
cppcoreguidelines-interfaces-global-init false positive for global references initialized from other globals
|
Labels |
clang-tidy,
false-positive
|
Assignees |
|
Reporter |
LegalizeAdulthood
|
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:
1. `git clone https://github.com/LegalizeAdulthood/iterated-dynamics.git`
2. `git checkout 3f219d4dfce69d8bcab73412d0b261f378a6a239`
3. `cmake --preset default`
4. run clang-tidy on `lorenz.cpp`
5. false positive reported for lines 1295-1300
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs