Issue 170033
Summary [clang-tidy][false-positive] `misc-const-correctness` incorrectly flags pointer passed to "pointer to pointer"
Labels clang-tidy, false-positive
Assignees
Reporter tearfur
    `misc-const-correctness` incorrectly flags pointer to non-const (e.g. `int*`) that are passed to pointer to pointer parameters (e.g. `int**`).

https://godbolt.org/z/8Mj4GGc5v:

```
<source>:7:5: warning: pointee of variable 'ip' of type 'int *' can be declared 'const' [misc-const-correctness]
    7 |     int* ip = &i;
      |     ^  
      | const
1 warning generated.
```

Current trunk: b22825631293c19f70ca9969bd9de6094c688430

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to