Issue 174366
Summary Parenthesized members are incorrectly recognized as constructors
Labels new issue
Assignees
Reporter Halalaluyafail3
    The following program demonstrates the issue:
```cpp
struct S{
    static S(foo);
};
int main(){}
```
`foo` isn't a valid _parameter-declaration-clause_, so this shouldn't be considered a constructor <https://eel.is/c++draft/class.ctor.general#1.sentence-1>. GCC, MSVC, and EDG accept this. Clang correctly parses this with another set of parentheses, e.g. `static S((foo));`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to