[PATCH] D146026: [clangd] Patch PragmaMarks in preamble section of the file

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 14 06:46:07 PDT 2023


hokein added inline comments.


================
Comment at: clang-tools-extra/clangd/Preamble.cpp:576
+
+std::vector<PragmaMark> getPragmaMarks(const ScannedPreamble &Modified) {
+  std::vector<PragmaMark> Marks;
----------------
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
```


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