Reland "[clangd][test] Disable a particular testcase in FindExplicitReferencesTest...
authorJan Korous <jkorous@apple.com>
Mon, 10 Feb 2020 20:11:47 +0000 (12:11 -0800)
committerJan Korous <jkorous@apple.com>
Mon, 10 Feb 2020 20:17:02 +0000 (12:17 -0800)
The test got re-enabled after d54d71b67e60 landed.

However it seems that the order is still not deterministic as it
currently passes with -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF but randomly
fails with expensive checks ON.

clang-tools-extra/clangd/unittests/FindTargetTests.cpp

index 1d2ea0f1c0b285216356ebc8511e2c69ab134454..be4b37c8f453b1bba905330b03b04e18cd6a46ee 100644 (file)
@@ -823,6 +823,10 @@ TEST_F(FindExplicitReferencesTest, All) {
         "1: targets = {vector}\n"
         "2: targets = {x}\n"},
        // Handle UnresolvedLookupExpr.
+       // FIXME
+       // This case fails when expensive checks are enabled.
+       // Seems like the order of ns1::func and ns2::func isn't defined.
+       #ifndef EXPENSIVE_CHECKS
        {R"cpp(
             namespace ns1 { void func(char*); }
             namespace ns2 { void func(int*); }
@@ -836,6 +840,7 @@ TEST_F(FindExplicitReferencesTest, All) {
         )cpp",
         "0: targets = {ns1::func, ns2::func}\n"
         "1: targets = {t}\n"},
+        #endif
        // Handle UnresolvedMemberExpr.
        {R"cpp(
             struct X {