Skip to content

Commit 8b351e7

Browse files
committed
Test
1 parent 8a1eebf commit 8b351e7

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

swift/extractor/infra/SwiftBodyEmissionStrategy.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ using namespace codeql;
1313
// all the other files.
1414
bool SwiftBodyEmissionStrategy::shouldEmitDeclBody(const swift::Decl& decl) {
1515
auto module = decl.getModuleContext();
16-
if (module != &currentModule) {
16+
if (module != &currentModule &&
17+
!(module->findUnderlyingClangModule() && currentModule.isSubmoduleOf(module))) {
1718
return false;
1819
}
1920
if (currentLazyDeclaration && currentLazyDeclaration != &decl) {

swift/extractor/infra/SwiftDispatcher.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
#include "swift/extractor/config/SwiftExtractorState.h"
1717
#include "swift/logging/SwiftAssert.h"
1818

19+
#include <swift/AST/ASTContext.h>
20+
#include <swift/AST/GenericEnvironment.h>
21+
#include <swift/AST/GenericParamList.h>
22+
#include <swift/AST/ClangModuleLoader.h>
23+
#include <clang/Basic/Module.h>
24+
1925
namespace codeql {
2026

2127
// The main responsibilities of the SwiftDispatcher are as follows:

0 commit comments

Comments
 (0)