-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clangd] Add test for GH75115 #75116
[clangd] Add test for GH75115 #75116
Conversation
@llvm/pr-subscribers-clangd Author: Matheus Izvekov (mizvekov) ChangesAdd test for #75115 Full diff: https://github.com/llvm/llvm-project/pull/75116.diff 1 Files Affected:
diff --git a/clang-tools-extra/clangd/test/GH75115.test b/clang-tools-extra/clangd/test/GH75115.test
new file mode 100644
index 00000000000000..bf6870c714e643
--- /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
|
a3971a6
to
7c18785
Compare
Add test for #75115
7c18785
to
1c9690d
Compare
The test is failing on our bots:
Does the output make sense to you? |
Aha, it assumes that the build is with assertions enabled, which isn't always true. (Do a release build, or a debug build with How about just reverting this and landing the test together with the fix? |
This reverts commit 04580ed. The test fails if asserts are disabled, see #75116 (comment) and the next comment.
I've reverted this for now in d860480. |
I see, thanks for pointing it out. I wonder if we support, or otherwise if we should support, a lit requires marker for this. |
Seems like unnecessary complexity to me fwiw. So far, we've put tests for things that work in the test suite and put a record of things that assert in the bug tracker :) |
Add test for #75115