[PATCH] D30963: Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls replaced by visible decls.
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 2 18:51:17 PDT 2017
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/Sema/SemaLookup.cpp:3792-3793
static void checkCorrectionVisibility(Sema &SemaRef, TypoCorrection &TC) {
if (TC.begin() == TC.end())
return;
----------------
jgorbe wrote:
> rsmith wrote:
> > Do we need to clear the flag on this path too? (This might happen if the old correction required an import and after clearing we set this up as a keyword correction.)
> If this might happen, then yes. I have updated the patch to clear the flag here as well but, on second thought, is this path necessary at all? It seems to me that 'no declarations' is a special case of 'all declarations are visible', which we check right after this.
I agree, this check is redundant. Just go ahead and remove it :)
https://reviews.llvm.org/D30963
More information about the cfe-commits
mailing list