This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Store offsets in MacroOccurrence
ClosedPublic

Authored by hokein on Jun 19 2023, 3:52 AM.

Details

Summary

Remove the existing Rng field.

From the review comment: https://reviews.llvm.org/D147034

Diff Detail

Event Timeline

hokein created this revision.Jun 19 2023, 3:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2023, 3:52 AM
Herald added a subscriber: arphaman. · View Herald Transcript
hokein requested review of this revision.Jun 19 2023, 3:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2023, 3:52 AM
kadircet accepted this revision.Jun 22 2023, 7:12 AM

thanks, lgtm!

clang-tools-extra/clangd/CollectMacros.cpp
37

nit: SM.getFileOffset

clang-tools-extra/clangd/CollectMacros.h
26

Represents an occurrence in main-file sounds like the documentation for the struct not for these fields.
what about // Half-open range (end offset is exclusive) inside the main file.. can you also move EndOffset to its own line?

This revision is now accepted and ready to land.Jun 22 2023, 7:12 AM
hokein updated this revision to Diff 533873.Jun 23 2023, 12:10 AM
hokein marked 2 inline comments as done.

address comments

This revision was landed with ongoing or failed builds.Jun 23 2023, 12:21 AM
This revision was automatically updated to reflect the committed changes.