[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 11 07:23:27 PDT 2024
================
@@ -451,6 +451,7 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs,
DiagnosticConsumer *DiagConsumer = &ASTDiags;
IgnoreDiagnostics DropDiags;
if (Preamble) {
+ CI->TargetOpts = Preamble->TargetOpts;
----------------
ilya-biryukov wrote:
It'd be useful to add a comment here explaining why we need it (i.e. "workaround a crash, see ParsedASTTest.PreambleWithDifferentTarget")
https://github.com/llvm/llvm-project/pull/88381
More information about the cfe-commits
mailing list