Issue |
83837
|
Summary |
Warn about redundant `const` in `constexpr` declarations?
|
Labels |
clang:diagnostics
|
Assignees |
|
Reporter |
zmodem
|
Consider:
```
constexpr int* const p = ...;
```
The `const` is redundant because `constexpr` implies constness.
We have some code like this where it seems the author may have intended `p` to be a "constant pointer to a constexpr int", which doesn't really make sense.
Perhaps a warning explaining that `p` is already const because of the constexpr would be helpful both in removing the redundancy, and showing users that constexpr applies to the variable?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs