[PATCH] Recovery of switch statement
Serge Pavlov
sepavloff at gmail.com
Wed May 21 08:14:11 PDT 2014
Thank you for review!
And special thanks for language corrections.
2014-05-21 8:07 GMT+07:00 Richard Smith <richard at metafoo.co.uk>:
> Looks fine with some tiny fixes.
>
> ================
> Comment at: lib/Parse/ParseStmt.cpp:706
> @@ +705,3 @@
> + // not valid. If ColonLoc doesn't point to valid text location,
> there was
> + // another parsing error, so don't produce extra diagnostic.
> + if (ColonLoc.isValid()) {
> ----------------
> "a valid text location"
> "an extra diagnostic" or "extra diagnostics"?
>
> ================
> Comment at: lib/Sema/SemaStmt.cpp:705-706
> @@ -704,2 +704,4 @@
>
> - SS->setBody(BodyStmt, SwitchLoc);
> + Stmt *Body = BodyStmt;
> + if (!Body) return StmtError();
> + SS->setBody(Body, SwitchLoc);
> ----------------
> Why the extra variable?
>
> http://reviews.llvm.org/D3137
>
>
>
http://reviews.llvm.org/D3137
More information about the cfe-commits
mailing list