This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Patch PragmaMarks in preamble section of the file
ClosedPublic

Authored by kadircet on Mar 14 2023, 2:45 AM.

Diff Detail

Event Timeline

kadircet created this revision.Mar 14 2023, 2:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2023, 2:45 AM
Herald added a subscriber: arphaman. · View Herald Transcript
kadircet requested review of this revision.Mar 14 2023, 2:45 AM
hokein added inline comments.Mar 14 2023, 6:46 AM
clang-tools-extra/clangd/Preamble.cpp
579

any reason not calling collectPragmaMarksCallback just like the https://reviews.llvm.org/D146028 for macros? is it for simplicity?

The pragma mark might be simple enough to parse ourselves, but it doesn't handle well for some trivial/corner cases like (well we probably don't care about these cases)

#pragma mark \
   abc
kadircet updated this revision to Diff 505091.Mar 14 2023, 7:34 AM
kadircet marked an inline comment as done.
  • Use collectPragmaMarksCallback
kadircet added inline comments.Mar 14 2023, 7:37 AM
clang-tools-extra/clangd/Preamble.cpp
579

yeah it was for not running it unnecessarily, but you're right I guess it's not worth the discrepancy. using collectPragmaMarksCallback instead.

hokein accepted this revision.Mar 15 2023, 12:36 AM
This revision is now accepted and ready to land.Mar 15 2023, 12:36 AM