MCPcopy Create free account
hub / github.com/KDE/kdevelop / testExternC

Method testExternC

plugins/clang/tests/test_duchain.cpp:1815–1826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1813}
1814
1815void TestDUChain::testExternC()
1816{
1817 auto code = R"(extern "C" { void foo(); })";
1818 TestFile file(code, QStringLiteral("cpp"));
1819 file.parse(TopDUContext::AllDeclarationsContextsAndUses);
1820 QVERIFY(file.waitForParsed());
1821
1822 DUChainReadLocker lock;
1823 auto top = file.topContext();
1824 QVERIFY(top);
1825 QVERIFY(!top->findDeclarations(QualifiedIdentifier(u"foo")).isEmpty());
1826}
1827
1828void TestDUChain::testIncludeExternC()
1829{

Callers

nothing calls this directly

Calls 6

waitForParsedMethod · 0.80
findDeclarationsMethod · 0.80
QualifiedIdentifierClass · 0.50
parseMethod · 0.45
topContextMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected