[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


================
@@ -768,6 +764,35 @@ TEST(ParsedASTTest, GracefulFailureOnAssemblyFile) {
       << "Should not try to build AST for assembly source file";
 }
 
+TEST(ParsedASTTest, PreambleWithDifferentTarget) {
+  constexpr std::string_view kPreambleTarget = "x86_64";
----------------
ilya-biryukov wrote:

I'm not sure if we'll hit this in practice, but this test will fail if the specified targets are disabled during builds.
We might need to guard it against wrong build configurations.

I'd wait until some buildbot fails, though, maybe we never actually run Clangd tests when the set of targets is small.

https://github.com/llvm/llvm-project/pull/88381


More information about the cfe-commits mailing list