[PATCH] D146026: [clangd] Patch PragmaMarks in preamble section of the file
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 14 07:37:29 PDT 2023
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/Preamble.cpp:576
+
+std::vector<PragmaMark> getPragmaMarks(const ScannedPreamble &Modified) {
+ std::vector<PragmaMark> Marks;
----------------
hokein wrote:
> 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
> ```
yeah it was for not running it unnecessarily, but you're right I guess it's not worth the discrepancy. using `collectPragmaMarksCallback` instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146026/new/
https://reviews.llvm.org/D146026
More information about the cfe-commits
mailing list