Page MenuHomePhabricator

[AST] Record SourceLocation for TypoExpr.

Authored by hokein on Jun 2 2020, 7:36 AM.

Diff Detail

Event Timeline

hokein created this revision.Jun 2 2020, 7:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2020, 7:36 AM
sammccall added inline comments.Jun 2 2020, 9:29 AM

can we have Start != End in practice?

Looking at DeclarationNameInfo::getEndLocPrivate(), it seems like this only happens in operators, literal-operators, conversions, constructors/destructors.

If these don't actually support typo correction maybe we should just use one location?

hokein updated this revision to Diff 268068.Jun 2 2020, 11:58 PM
hokein marked an inline comment as done.

use a single location.

hokein added inline comments.Jun 3 2020, 12:01 AM

ah, yes, I missed this.

typo correction only supports identifiers, so Start and End are always the same.

sammccall accepted this revision.Jun 3 2020, 3:08 AM
This revision is now accepted and ready to land.Jun 3 2020, 3:08 AM
This revision was automatically updated to reflect the committed changes.