On Wed, Jun 26, 2013 at 12:35 PM, Luke Zarko <[email protected]> wrote: > I found a case where Clang doesn't yet help with typo correction: > > tests/base_using.cc: > > namespace Q { class AAA {}; } > using Q::AAB; > > Before: > > tests/base_using.cc:2:10: error: no member named 'AAB' in namespace 'Q' > using Q::AAB; > ~~~^ > > After: > > tests/base_using.cc:2:10: error: no member named 'AAB' in namespace > 'Q'; did you mean 'AAA'? > using Q::AAB; > ~~~^ > tests/base_using.cc:1:21: note: 'AAA' declared here > namespace Q { class AAA {}; } > ^
Code change looks good, but could do with more test coverage for the type name / non-type-name / in instantiation cases. + Diag(R.getNameLoc(), diag::err_no_member_suggest) + << NameInfo.getName() << LookupContext << CorrectedQuotedStr + << SS.getRange(); We typically indent << only two spaces, not four (clang-format bug?). _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
