[PATCH] D125179: [clangd] Skip (most) predefined macros when scanning for preamble patching.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 9 06:34:24 PDT 2022
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf1a9c4b717be: [clangd] Skip (most) predefined macros when scanning for preamble patching. (authored by sammccall).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125179/new/
https://reviews.llvm.org/D125179
Files:
clang-tools-extra/clangd/Preamble.cpp
Index: clang-tools-extra/clangd/Preamble.cpp
===================================================================
--- clang-tools-extra/clangd/Preamble.cpp
+++ clang-tools-extra/clangd/Preamble.cpp
@@ -302,6 +302,7 @@
return error("compiler instance had no inputs");
// We are only interested in main file includes.
Clang->getPreprocessorOpts().SingleFileParseMode = true;
+ Clang->getPreprocessorOpts().UsePredefines = false;
PreprocessOnlyAction Action;
if (!Action.BeginSourceFile(*Clang, Clang->getFrontendOpts().Inputs[0]))
return error("failed BeginSourceFile");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125179.428064.patch
Type: text/x-patch
Size: 591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220509/ecbeccce/attachment.bin>
More information about the cfe-commits
mailing list