Open llvmbot opened 10 years ago
Clang is correct here.
Your declaration disambiguates as a function declaration, not as a variable declaration. The disambiguation process doesn't take into account whether function parameter declarations are qualified or unqualified (because that is governed by semantic rules, not by the grammar).
That said, we should diagnose this better, especially since other implementations accept it. I'll also raise this with the C++ CWG and see if we can get a language change to accept this.
Extended Description
The attached test case can't be compiled by clang but passes without any hassles in g++ and the Oracle/Sunstudio C++ compiler.
The primary error message is:
The attached test case is a common Qt usage in our tools. I have removed everything and only left the needed declarations.