[PATCH] Improve error recovery around colon.
Serge Pavlov
sepavloff at gmail.com
Sun Apr 13 04:50:01 PDT 2014
Thank you!
2014-04-13 8:25 GMT+07:00 Richard Smith <richard at metafoo.co.uk>:
>
> This looks great, thanks! Some tiny tweaks, then please commit.
>
>
> ================
> Comment at: lib/Sema/SemaCXXScopeSpec.cpp:533
> @@ +532,3 @@
> + }
> + // Replacement '::' -> is not allowed, just issue respective error.
> + if (!ErrorRecoveryLookup) {
> ----------------
> I assume this was supposed to say `'::' -> ':' is not allowed`?
>
> ================
> Comment at: lib/Sema/SemaCXXScopeSpec.cpp:524
> @@ +523,3 @@
> + *IsCorrectedToColon = true;
> + if (!ErrorRecoveryLookup) {
> + Diag(CCLoc, diag::err_nested_name_spec_is_not_class)
> ----------------
> This check is redundant: we're already inside an `if
> (!ErrorRecoveryLookup)` check.
>
> ================
> Comment at: lib/Sema/SemaCXXScopeSpec.cpp:534
> @@ +533,3 @@
> + // Replacement '::' -> is not allowed, just issue respective error.
> + if (!ErrorRecoveryLookup) {
> + Diag(R.getNameLoc(), diag::err_expected_class_or_namespace)
> ----------------
> Likewise.
>
>
> http://reviews.llvm.org/D2870
>
> BRANCH
> pr15133
>
> ARCANIST PROJECT
> clang
>
>
>
http://reviews.llvm.org/D2870
BRANCH
pr15133
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list