From a6c1da9b220feadde7f9d50ae735159ce164fff6 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Mon, 12 Aug 2024 13:37:10 +0100 Subject: [PATCH] [clangd][test] Account for downstream coroutines hack in isKeywords test --- clang-tools-extra/clangd/unittests/SourceCodeTests.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp b/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp index d7fd1a09e85d..419ebd35d3da 100644 --- a/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp +++ b/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp @@ -804,6 +804,10 @@ TEST(SourceCodeTests, isKeywords) { LangOpts.CPlusPlus20 = true; EXPECT_TRUE(isKeyword("int", LangOpts)); EXPECT_TRUE(isKeyword("return", LangOpts)); + // CHERI-TODO: COROUTINES_KEYWORD is not included in CXX20_KEYWORD until + // https://github.com/CTSRD-CHERI/llvm-project/issues/717 has been fixed. + EXPECT_FALSE(isKeyword("co_await", LangOpts)); + LangOpts.Coroutines = true; EXPECT_TRUE(isKeyword("co_await", LangOpts)); // these are identifiers (not keywords!) with special meaning in some