Open llvmbot opened 14 years ago
Same error happens with normal member functions too (and probably with non-member ones since it seems it all depends on the parsing of the :
making the code think what follows is very likely a function definition and thus issuing the confusing error).
You can't have an initializer list after a destructor tho :)
clang isn't going insane here :) Because of the colon, clang assumes there's an initializer list, which it delays parsing, so clang isn't actually aware something is wrong until it doesn't find the {
. (As it happens, attaching an initializer list to a destructor isn't legal, and the syntax of the skipped tokens doesn't match that of an initializer list, but clang doesn't check for those issues until later.)
Extended Description
This testcase has a typo where
:
was used in place of;
.The clang error is Just Wrong: