Skip to content

Commit 89b8a34

Browse files
committed
test
1 parent 04757e7 commit 89b8a34

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,6 +2111,22 @@ TEST_F(SymbolCollectorTest, Reserved) {
21112111
EXPECT_THAT(Symbols, IsEmpty());
21122112
}
21132113

2114+
TEST_F(SymbolCollectorTest, UnreservedIntrin) {
2115+
const char *Header = R"cpp(
2116+
#pragma once
2117+
void __foo();
2118+
)cpp";
2119+
2120+
TestHeaderName = "x.h";
2121+
TestFileName = "x.cpp";
2122+
TestHeaderURI = URI::create(testPath(TestHeaderName)).toString();
2123+
InMemoryFileSystem = new llvm::vfs::InMemoryFileSystem;
2124+
CollectorOpts.FallbackDir = testRoot();
2125+
runSymbolCollector("#pragma GCC system_header\n" + std::string(Header), "");
2126+
EXPECT_THAT(Symbols, UnorderedElementsAre(qName("__foo"), qName("_X"),
2127+
qName("_X::secret")));
2128+
}
2129+
21142130
TEST_F(SymbolCollectorTest, Concepts) {
21152131
const char *Header = R"cpp(
21162132
template <class T>

0 commit comments

Comments
 (0)