sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/Preamble.cpp:125
   auto ContentsBuffer = llvm::MemoryBuffer::getMemBuffer(Contents);
+  auto Bounds =
+      ComputePreambleBounds(*CI->getLangOpts(), ContentsBuffer.get(), 0);
----------------
Maybe add a comment here:
```
// This means we're scanning (though not preprocessing) the preamble section 
twice.
// However, it's important to precisely follow the preamble bounds used 
elsewhere.
```

This guards somewhat against someone sending the reverse patch. Chesterton's 
fence etc.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79426/new/

https://reviews.llvm.org/D79426



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D79426: [clangd] C... Sam McCall via Phabricator via cfe-commits

Reply via email to