Open Quuxplusone opened 4 years ago
Bugzilla Link | PR46607 |
Status | NEW |
Importance | P normal |
Reported by | Haoxin Tu (haoxintu@gmail.com) |
Reported on | 2020-07-06 09:47:11 -0700 |
Last modified on | 2020-07-06 11:26:40 -0700 |
Version | trunk |
Hardware | PC Linux |
CC | llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
The C++98 specification strangely permitted an optional semicolon after a
member function definition:
member-declaration:
function-definition ;[opt]
As a consequence, clang allows a single semicolon in this position but
diagnoses if there are two or more semicolons.
I think the case with a member function *template* is a minor bug, though: that
uses a different grammar production that does not permit a trailing semicolon,
so pedantically we should diagnose that, even though it will make the behaviour
in your testcase look even more arbitrary.