[PATCH] Improve diagnostic message for misplaced square brackets
richard at metafoo.co.uk
Tue Jun 24 08:58:26 PDT 2014
Looks great, with one tweak.
Comment at: lib/Parse/ParseDecl.cpp:5646-5649
@@ +5645,6 @@
+ // Nothing after the brackets has been parsed as part of the Declarator, so
+ // no correction is needed.
+ if (OldEndLoc == D.getLocEnd())
This looks unreachable. If nothing after the brackets has been parsed, then there can't be an identifier, so we should have bailed out already. Remove?
More information about the cfe-commits