[clang-tools-extra] [clangd] Add test for GH75115 (PR #75116)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 11 15:25:19 PST 2023


https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/75116

Add test for https://github.com/llvm/llvm-project/issues/75115

>From bd01b0d71c05fa7d728b6db08d14d51fe332ae2c Mon Sep 17 00:00:00 2001
From: Matheus Izvekov <mizvekov at gmail.com>
Date: Mon, 11 Dec 2023 17:36:44 -0300
Subject: [PATCH] [clangd] Add test for GH75115

Add test for https://github.com/llvm/llvm-project/issues/75115
---
 clang-tools-extra/clangd/test/GH75115.test | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 clang-tools-extra/clangd/test/GH75115.test

diff --git a/clang-tools-extra/clangd/test/GH75115.test b/clang-tools-extra/clangd/test/GH75115.test
new file mode 100644
index 0000000000000..bf6870c714e64
--- /dev/null
+++ b/clang-tools-extra/clangd/test/GH75115.test
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t.dir && mkdir -p %t.dir
+// RUN: echo '[{"directory": "%/t.dir", "command": "clang --target=x86_64-pc-windows-msvc -x c bug.test", "file": "bug.test"}]' > %t.dir/compile_commands.json
+// RUN: not clangd -enable-config=0 --compile-commands-dir=%t.dir -check=%s 2>&1 | FileCheck -strict-whitespace %s
+
+// FIXME: Crashes
+
+// CHECK: Building preamble...
+// CHECK-NEXT: Built preamble
+// CHECK-NEXT: Indexing headers...
+// CHECK-NEXT: Assertion failed: !KeyInfoT::isEqual(Val, EmptyKey) && !KeyInfoT::isEqual(Val, TombstoneKey) && "Empty/Tombstone value shouldn't be inserted into map!"
+
+#define assert



More information about the cfe-commits mailing list