-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Open
Labels
accepts-invalidclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
Per [class.ctor.general]/1, a constructor declarator cannot be parenthesized:
struct A {
// OK, constructor
(A)(int);
// Error, not a constructor due to enclosing parens.
(A(float));
};
// OK, constructor
(A::A(int)) {}
// Error, not a constructor due to enclosing parens.
(A::A(float)) {}
But Clang accepts anyway, as do all other major compilers. We should reject under -pedantic-errors
, but given the widespread support it probably makes sense to continue to accept this by default.
frederick-vs-ja
Metadata
Metadata
Assignees
Labels
accepts-invalidclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"