[PATCH] D124970: [Driver] Make "upgrade" of -include to include-pch optional; disable in clangd

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 5 06:02:22 PDT 2022


kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.

thanks, LGTM!

as discussed offline, let's move forward with what you proposed (i.e. this patch, and then flip the default while making libclang opt-in)



================
Comment at: clang/include/clang/Driver/Driver.h:275
+  /// Whether to probe for PCH files on disk,
+  /// in order to upgrade -include foo.h to -include-pch foo.h.pch.
+  unsigned ProbePrecompiled : 1;
----------------
nit: reflow the comment


================
Comment at: clang/lib/Frontend/CreateInvocationFromCommandLine.cpp:54
   TheDriver.setCheckInputsExist(false);
+  // Don't probe on the filesystem for PCHes of -include'd headers - we may have
+  // a VFS, they may be misversioned, etc.
----------------
this comment feels a little bit outdated. we're definitely not turning this off and also probing is done in VFS now.
So maybe drop this and rather have a comment in header, pointing out possible failure modes due to version mismatch when this is turned on?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124970



More information about the cfe-commits mailing list