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


================
Comment at: clangd/ClangdUnit.h:53
   std::vector<Diag> Diags;
-  InclusionLocations IncLocations;
+  std::vector<Inclusion> Inclusions;
 };
----------------
this might be a good place to explain *why* we collect these - processes like 
code completion will need #include information later, and their compile action 
skips the preamble range


================
Comment at: clangd/Headers.h:47
+std::unique_ptr<PPCallbacks>
+collectInclusionsInMainFileCallback(const SourceManager &SM,
+                                    std::vector<Inclusion> &Inclusions);
----------------
as Ilya suggested, I like the idea of passing a callback(Inclusion) here rather 
than a vector reference. It's much more obvious at the callsite what's going to 
happen (and doesn't force the use of the vector).
Also lifetime issues are still a little complicated, but easier to debug I 
think.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D46675



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to