Issue |
151013
|
Summary |
Invalid use of constinit, constexpr, and consteval in function parameter not diagnosed
|
Labels |
new issue
|
Assignees |
|
Reporter |
esqa
|
Clang does not emit diagnostics when constinit, constexpr and consteval are used incorrectly in a function parameter. These specifiers are invalid in this context per the C++ standard and should trigger a diagnostic error during parsing or semantic analysis.
### **Example:**
```cpp
void func(constinit float consteval* haha) {}
```
### **Expectation:**
Clear diagnostic messages indicating misuse of both keywords.
### **Reality:**
No diagnostic at the point of declaration. Compilation fails later or proceeds incorrectly depending on toolchain behavior.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs