[PATCH] Improve error recovery around colon.
Richard Smith
richard at metafoo.co.uk
Sat Apr 12 18:25:37 PDT 2014
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
More information about the cfe-commits
mailing list