You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spec.cpp:2:6: error: redefinition of 'func'
void func() = delete;
^
spec.cpp:1:6: note: previous definition is here
void func() { }
^
spec.cpp:2:15: error: deleted definition must be first declaration
void func() = delete;
^
spec.cpp:1:6: note: previous declaration is here
void func() { }
^
Essentially the same diagnostic twice. Either we could simply suppress the second diagnostic when we know the function is already defined (& thus we already produced the first diagnostic), or suppress the first diagnostic when the new definition is deleted and, possibly, make the "deleted definition must be first" diagnostic have some more specific text for this case (based on the same property as the first option: that there's already a definition)
The text was updated successfully, but these errors were encountered:
Extended Description
Given:
void func() { }
void func() = delete;
Clang produces:
spec.cpp:2:6: error: redefinition of 'func'
void func() = delete;
^
spec.cpp:1:6: note: previous definition is here
void func() { }
^
spec.cpp:2:15: error: deleted definition must be first declaration
void func() = delete;
^
spec.cpp:1:6: note: previous declaration is here
void func() { }
^
Essentially the same diagnostic twice. Either we could simply suppress the second diagnostic when we know the function is already defined (& thus we already produced the first diagnostic), or suppress the first diagnostic when the new definition is deleted and, possibly, make the "deleted definition must be first" diagnostic have some more specific text for this case (based on the same property as the first option: that there's already a definition)
The text was updated successfully, but these errors were encountered: