[PATCH] Sema: Properly perform lookup when acting on fields for desig inits
Richard Smith
richard at metafoo.co.uk
Mon Aug 11 11:03:41 PDT 2014
LGTM
================
Comment at: lib/Sema/SemaInit.cpp:1924
@@ -1954,2 +1923,3 @@
+ << FieldName << CurrentObjectType);
ReplacementField = Corrected.getCorrectionDeclAs<FieldDecl>();
hadError = true;
----------------
Assign directly to `KnownField` here and remove `ReplacementField`.
================
Comment at: lib/Sema/SemaInit.cpp:1929
@@ -1957,1 +1928,3 @@
+ // Typo correction didn't find anything.
+ if (!ReplacementField) {
SemaRef.Diag(D->getFieldLoc(), diag::err_field_designator_unknown)
----------------
Maybe `else`?
http://reviews.llvm.org/D4839
More information about the cfe-commits
mailing list