Skip to content

Commit 5e22a5b

Browse files
Merge pull request #82243 from AnthonyLatsis/rebranch
[rebranch] Get Swift almost building with stable/20250601
2 parents ff76498 + b58d10c commit 5e22a5b

21 files changed

+113
-87
lines changed

include/swift/ClangImporter/SwiftAbstractBasicReader.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ class DataStreamBasicReader
6464
return uint32_t(asImpl().readUInt64());
6565
}
6666

67+
clang::UnsignedOrNone readUnsignedOrNone() {
68+
return clang::UnsignedOrNone::fromInternalRepresentation(
69+
unsigned(asImpl().readUInt64()));
70+
}
71+
6772
clang::Selector readSelector() {
6873
uint64_t numArgsPlusOne = asImpl().readUInt64();
6974

include/swift/ClangImporter/SwiftAbstractBasicWriter.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ class DataStreamBasicWriter
6161
asImpl().writeUInt64(uint64_t(value));
6262
}
6363

64+
void writeUnsignedOrNone(clang::UnsignedOrNone value) {
65+
asImpl().writeUInt64(uint64_t(value.toInternalRepresentation()));
66+
}
67+
6468
void writeSelector(clang::Selector selector) {
6569
if (selector.isNull()) {
6670
asImpl().writeUInt64(0);

lib/AST/Builtins.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2497,7 +2497,6 @@ Type IntrinsicTypeDecoder::decodeImmediate() {
24972497
case IITDescriptor::Metadata:
24982498
case IITDescriptor::ExtendArgument:
24992499
case IITDescriptor::TruncArgument:
2500-
case IITDescriptor::HalfVecArgument:
25012500
case IITDescriptor::VarArg:
25022501
case IITDescriptor::Token:
25032502
case IITDescriptor::VecOfAnyPtrsToElt:
@@ -2506,9 +2505,7 @@ Type IntrinsicTypeDecoder::decodeImmediate() {
25062505
case IITDescriptor::Subdivide4Argument:
25072506
case IITDescriptor::PPCQuad:
25082507
case IITDescriptor::AArch64Svcount:
2509-
case IITDescriptor::OneThirdVecArgument:
2510-
case IITDescriptor::OneFifthVecArgument:
2511-
case IITDescriptor::OneSeventhVecArgument:
2508+
case IITDescriptor::OneNthEltsVecArgument:
25122509
// These types cannot be expressed in swift yet.
25132510
return Type();
25142511

lib/AST/ClangTypeConverter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ getClangBuiltinTypeFromKind(const clang::ASTContext &context,
7171
#define SVE_TYPE(Name, Id, SingletonId) \
7272
case clang::BuiltinType::Id: \
7373
return context.SingletonId;
74-
#include "clang/Basic/AArch64SVEACLETypes.def"
74+
#include "clang/Basic/AArch64ACLETypes.def"
7575
#define PPC_VECTOR_TYPE(Name, Id, Size) \
7676
case clang::BuiltinType::Id: \
7777
return context.Id##Ty;

lib/Basic/Platform.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
273273
return "none";
274274
case llvm::Triple::UEFI:
275275
case llvm::Triple::LiteOS:
276+
case llvm::Triple::Managarm:
276277
llvm_unreachable("unsupported OS");
277278
}
278279
llvm_unreachable("unsupported OS");

lib/Basic/TargetInfo.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ void printTripleInfo(const CompilerInvocation &invocation,
145145
out << " \"arch\": \"" << swift::getMajorArchitectureName(triple)
146146
<< "\",\n";
147147

148-
clang::DiagnosticsEngine DE{new clang::DiagnosticIDs(),
149-
new clang::DiagnosticOptions(),
148+
clang::DiagnosticOptions diagOpts;
149+
clang::DiagnosticsEngine DE{new clang::DiagnosticIDs(), diagOpts,
150150
new clang::IgnoringDiagConsumer()};
151-
std::shared_ptr<clang::TargetOptions> TO =
152-
std::make_shared<clang::TargetOptions>();
153-
TO->Triple = triple.str();
154-
clang::TargetInfo *TI = clang::TargetInfo::CreateTargetInfo(DE, TO);
151+
152+
clang::TargetOptions targetOpts;
153+
targetOpts.Triple = triple.str();
154+
clang::TargetInfo *TI = clang::TargetInfo::CreateTargetInfo(DE, targetOpts);
155155
out << " \"pointerWidthInBits\": "
156156
<< TI->getPointerWidth(clang::LangAS::Default) << ",\n";
157157
out << " \"pointerWidthInBytes\": "

lib/ClangImporter/ClangAdapter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ OmissionTypeName importer::getClangTypeNameForOmission(clang::ASTContext &ctx,
428428

429429
// ARM SVE builtin types that don't have Swift equivalents.
430430
#define SVE_TYPE(Name, Id, ...) case clang::BuiltinType::Id:
431-
#include "clang/Basic/AArch64SVEACLETypes.def"
431+
#include "clang/Basic/AArch64ACLETypes.def"
432432
return OmissionTypeName();
433433

434434
// PPC MMA builtin types that don't have Swift equivalents.

lib/ClangImporter/ClangDiagnosticConsumer.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ namespace {
3434

3535
public:
3636
ClangDiagRenderer(const clang::LangOptions &langOpts,
37-
clang::DiagnosticOptions *diagOpts,
38-
decltype(callback) fn)
39-
: DiagnosticNoteRenderer(langOpts, diagOpts),
40-
callback(fn) {}
37+
clang::DiagnosticOptions &diagOpts, decltype(callback) fn)
38+
: DiagnosticNoteRenderer(langOpts, diagOpts), callback(fn) {}
4139

4240
private:
4341
/// Is this a diagnostic that doesn't do the user any good to show if it
@@ -107,10 +105,9 @@ namespace {
107105

108106
ClangDiagnosticConsumer::ClangDiagnosticConsumer(
109107
ClangImporter::Implementation &impl,
110-
clang::DiagnosticOptions &clangDiagOptions,
111-
bool dumpToStderr)
112-
: TextDiagnosticPrinter(llvm::errs(), &clangDiagOptions),
113-
ImporterImpl(impl), DumpToStderr(dumpToStderr) {}
108+
clang::DiagnosticOptions &clangDiagOptions, bool dumpToStderr)
109+
: TextDiagnosticPrinter(llvm::errs(), clangDiagOptions), ImporterImpl(impl),
110+
DumpToStderr(dumpToStderr) {}
114111

115112
void ClangDiagnosticConsumer::HandleDiagnostic(
116113
clang::DiagnosticsEngine::Level clangDiagLevel,
@@ -179,7 +176,7 @@ void ClangDiagnosticConsumer::HandleDiagnostic(
179176
assert(clangDiag.hasSourceManager());
180177
auto clangCI = ImporterImpl.getClangInstance();
181178
ClangDiagRenderer renderer(clangCI->getLangOpts(),
182-
&clangCI->getDiagnosticOpts(), emitDiag);
179+
clangCI->getDiagnosticOpts(), emitDiag);
183180
clang::FullSourceLoc clangDiagLoc(clangDiag.getLocation(),
184181
clangDiag.getSourceManager());
185182
renderer.emitDiagnostic(clangDiagLoc, clangDiagLevel, message,

lib/ClangImporter/ClangImporter.cpp

Lines changed: 46 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "swift/AST/ConcreteDeclRef.h"
2727
#include "swift/AST/DiagnosticEngine.h"
2828
#include "swift/AST/DiagnosticsClangImporter.h"
29+
#include "swift/AST/DiagnosticsFrontend.h"
2930
#include "swift/AST/DiagnosticsSema.h"
3031
#include "swift/AST/Evaluator.h"
3132
#include "swift/AST/IRGenOptions.h"
@@ -328,7 +329,7 @@ class BridgingPPTracker : public clang::PPCallbacks {
328329
return;
329330
SmallVector<clang::SourceLocation, 4> IdLocs;
330331
for (auto &P : Path)
331-
IdLocs.push_back(P.second);
332+
IdLocs.push_back(P.getLoc());
332333
handleImport(ImportLoc, IdLocs, Imported);
333334
}
334335

@@ -982,10 +983,8 @@ bool ClangImporter::canReadPCH(StringRef PCHFilename) {
982983
// FIXME: The following attempts to do an initial ReadAST invocation to verify
983984
// the PCH, without causing trouble for the existing CompilerInstance.
984985
// Look into combining creating the ASTReader along with verification + update
985-
// if necessary, so that we can create and use one ASTReader in the common case
986-
// when there is no need for update.
987-
clang::CompilerInstance CI(Impl.Instance->getPCHContainerOperations(),
988-
&Impl.Instance->getModuleCache());
986+
// if necessary, so that we can create and use one ASTReader in the common
987+
// case when there is no need for update.
989988
auto invocation =
990989
std::make_shared<clang::CompilerInvocation>(*Impl.Invocation);
991990
invocation->getPreprocessorOpts().DisablePCHOrModuleValidation =
@@ -1000,10 +999,13 @@ bool ClangImporter::canReadPCH(StringRef PCHFilename) {
1000999
// will try to free it.
10011000
invocation->getPreprocessorOpts().RemappedFileBuffers.clear();
10021001

1003-
CI.setInvocation(std::move(invocation));
1002+
clang::DiagnosticOptions diagOpts;
1003+
clang::CompilerInstance CI(std::move(invocation),
1004+
Impl.Instance->getPCHContainerOperations(),
1005+
&Impl.Instance->getModuleCache());
10041006
CI.setTarget(&Impl.Instance->getTarget());
10051007
CI.setDiagnostics(&*clang::CompilerInstance::createDiagnostics(
1006-
Impl.Instance->getVirtualFileSystem(), new clang::DiagnosticOptions()));
1008+
Impl.Instance->getVirtualFileSystem(), diagOpts));
10071009

10081010
// Note: Reusing the file manager is safe; this is a component that's already
10091011
// reused when building PCM files for the module cache.
@@ -1155,13 +1157,11 @@ std::optional<std::vector<std::string>> ClangImporter::getClangCC1Arguments(
11551157
//
11561158
// The long-term client for Clang diagnostics is set up afterwards, after the
11571159
// clang::CompilerInstance is created.
1158-
llvm::IntrusiveRefCntPtr<clang::DiagnosticOptions> tempDiagOpts{
1159-
new clang::DiagnosticOptions};
1160-
auto *tempDiagClient =
1161-
new ClangDiagnosticConsumer(Impl, *tempDiagOpts,
1162-
ctx.ClangImporterOpts.DumpClangDiagnostics);
1160+
clang::DiagnosticOptions tempDiagOpts;
1161+
auto *tempDiagClient = new ClangDiagnosticConsumer(
1162+
Impl, tempDiagOpts, ctx.ClangImporterOpts.DumpClangDiagnostics);
11631163
auto clangDiags = clang::CompilerInstance::createDiagnostics(
1164-
*VFS, tempDiagOpts.get(), tempDiagClient,
1164+
*VFS, tempDiagOpts, tempDiagClient,
11651165
/*owned*/ true);
11661166

11671167
// If using direct cc1 module build, use extra args to setup ClangImporter.
@@ -1281,10 +1281,10 @@ std::unique_ptr<clang::CompilerInvocation> ClangImporter::createClangInvocation(
12811281
// option here is either generated by dependency scanner or just round tripped
12821282
// from `getClangCC1Arguments` so we don't expect it to fail. Use a simple
12831283
// printing diagnostics consumer for debugging any unexpected error.
1284-
auto diagOpts = llvm::makeIntrusiveRefCnt<clang::DiagnosticOptions>();
1284+
clang::DiagnosticOptions diagOpts;
12851285
clang::DiagnosticsEngine clangDiags(
12861286
new clang::DiagnosticIDs(), diagOpts,
1287-
new clang::TextDiagnosticPrinter(llvm::errs(), diagOpts.get()));
1287+
new clang::TextDiagnosticPrinter(llvm::errs(), diagOpts));
12881288

12891289
// Finally, use the CC1 command-line and the diagnostic engine
12901290
// to instantiate our Invocation.
@@ -1380,12 +1380,10 @@ ClangImporter::create(ASTContext &ctx,
13801380
std::make_unique<clang::ObjectFilePCHContainerWriter>());
13811381
PCHContainerOperations->registerReader(
13821382
std::make_unique<clang::ObjectFilePCHContainerReader>());
1383-
importer->Impl.Instance.reset(
1384-
new clang::CompilerInstance(std::move(PCHContainerOperations)));
1383+
importer->Impl.Instance.reset(new clang::CompilerInstance(
1384+
importer->Impl.Invocation, std::move(PCHContainerOperations)));
13851385
}
13861386
auto &instance = *importer->Impl.Instance;
1387-
instance.setInvocation(importer->Impl.Invocation);
1388-
13891387
if (tracker)
13901388
instance.addDependencyCollector(tracker->getClangCollector());
13911389

@@ -1430,7 +1428,7 @@ ClangImporter::create(ASTContext &ctx,
14301428
if (!swiftTargetClangInvocation)
14311429
return nullptr;
14321430
auto targetInfo = clang::TargetInfo::CreateTargetInfo(
1433-
clangDiags, swiftTargetClangInvocation->TargetOpts);
1431+
clangDiags, swiftTargetClangInvocation->getTargetOpts());
14341432
// Ensure the target info has configured target-specific defines
14351433
std::string defineBuffer;
14361434
llvm::raw_string_ostream predefines(defineBuffer);
@@ -1442,7 +1440,7 @@ ClangImporter::create(ASTContext &ctx,
14421440
} else {
14431441
// Just use the existing Invocation's directly
14441442
importer->Impl.setSwiftTargetInfo(clang::TargetInfo::CreateTargetInfo(
1445-
clangDiags, importer->Impl.Invocation->TargetOpts));
1443+
clangDiags, importer->Impl.Invocation->getTargetOpts()));
14461444
importer->Impl.setSwiftCodeGenOptions(
14471445
new clang::CodeGenOptions(importer->Impl.Invocation->getCodeGenOpts()));
14481446
}
@@ -1461,9 +1459,8 @@ ClangImporter::create(ASTContext &ctx,
14611459
// things here.
14621460

14631461
// Create the target instance.
1464-
instance.setTarget(
1465-
clang::TargetInfo::CreateTargetInfo(clangDiags,
1466-
instance.getInvocation().TargetOpts));
1462+
instance.setTarget(clang::TargetInfo::CreateTargetInfo(
1463+
clangDiags, instance.getInvocation().getTargetOpts()));
14671464
if (!instance.hasTarget())
14681465
return nullptr;
14691466

@@ -1916,9 +1913,8 @@ std::string ClangImporter::getBridgingHeaderContents(
19161913
clang::FileManager &fileManager = Impl.Instance->getFileManager();
19171914

19181915
clang::CompilerInstance rewriteInstance(
1919-
Impl.Instance->getPCHContainerOperations(),
1920-
&Impl.Instance->getModuleCache());
1921-
rewriteInstance.setInvocation(invocation);
1916+
std::move(invocation), Impl.Instance->getPCHContainerOperations(),
1917+
&Impl.Instance->getModuleCache());
19221918
rewriteInstance.createDiagnostics(fileManager.getVirtualFileSystem(),
19231919
new clang::IgnoringDiagConsumer);
19241920
rewriteInstance.setFileManager(&fileManager);
@@ -2022,9 +2018,8 @@ ClangImporter::cloneCompilerInstanceForPrecompiling() {
20222018
clang::FileManager &fileManager = Impl.Instance->getFileManager();
20232019

20242020
auto clonedInstance = std::make_unique<clang::CompilerInstance>(
2025-
Impl.Instance->getPCHContainerOperations(),
2026-
&Impl.Instance->getModuleCache());
2027-
clonedInstance->setInvocation(std::move(invocation));
2021+
std::move(invocation), Impl.Instance->getPCHContainerOperations(),
2022+
&Impl.Instance->getModuleCache());
20282023
clonedInstance->createDiagnostics(fileManager.getVirtualFileSystem(),
20292024
&Impl.Instance->getDiagnosticClient(),
20302025
/*ShouldOwnClient=*/false);
@@ -2313,17 +2308,15 @@ ModuleDecl *ClangImporter::Implementation::loadModuleClang(
23132308
auto realModuleName = SwiftContext.getRealModuleName(path.front().Item).str();
23142309

23152310
// Convert the Swift import path over to a Clang import path.
2316-
SmallVector<std::pair<clang::IdentifierInfo *, clang::SourceLocation>, 4>
2317-
clangPath;
2311+
SmallVector<clang::IdentifierLoc, 4> clangPath;
23182312
bool isTopModuleComponent = true;
23192313
for (auto component : path) {
23202314
StringRef item = isTopModuleComponent? realModuleName:
23212315
component.Item.str();
23222316
isTopModuleComponent = false;
23232317

2324-
clangPath.emplace_back(
2325-
getClangPreprocessor().getIdentifierInfo(item),
2326-
exportSourceLoc(component.Loc));
2318+
clangPath.emplace_back(exportSourceLoc(component.Loc),
2319+
getClangPreprocessor().getIdentifierInfo(item));
23272320
}
23282321

23292322
auto &diagEngine = Instance->getDiagnostics();
@@ -2333,14 +2326,13 @@ ModuleDecl *ClangImporter::Implementation::loadModuleClang(
23332326
auto loadModule = [&](clang::ModuleIdPath path,
23342327
clang::Module::NameVisibilityKind visibility)
23352328
-> clang::ModuleLoadResult {
2336-
auto importRAII =
2337-
diagClient.handleImport(clangPath.front().first, diagEngine,
2338-
importLoc);
2329+
auto importRAII = diagClient.handleImport(
2330+
clangPath.front().getIdentifierInfo(), diagEngine, importLoc);
23392331

23402332
std::string preservedIndexStorePathOption;
23412333
auto &clangFEOpts = Instance->getFrontendOpts();
23422334
if (!clangFEOpts.IndexStorePath.empty()) {
2343-
StringRef moduleName = path[0].first->getName();
2335+
StringRef moduleName = path[0].getIdentifierInfo()->getName();
23442336
// Ignore the SwiftShims module for the index data.
23452337
if (moduleName == SwiftContext.SwiftShimsModuleName.str()) {
23462338
preservedIndexStorePathOption = clangFEOpts.IndexStorePath;
@@ -4178,8 +4170,8 @@ ClangImporter::getSwiftExplicitModuleDirectCC1Args() const {
41784170
});
41794171

41804172
clang::CompilerInvocation instance;
4181-
clang::DiagnosticsEngine clangDiags(new clang::DiagnosticIDs(),
4182-
new clang::DiagnosticOptions(),
4173+
clang::DiagnosticOptions diagOpts;
4174+
clang::DiagnosticsEngine clangDiags(new clang::DiagnosticIDs(), diagOpts,
41834175
new clang::IgnoringDiagConsumer());
41844176
bool success = clang::CompilerInvocation::CreateFromArgs(instance, clangArgs,
41854177
clangDiags);
@@ -4232,8 +4224,19 @@ ClangImporter::getSwiftExplicitModuleDirectCC1Args() const {
42324224
if (!Impl.SwiftContext.SearchPathOpts.ScannerPrefixMapper.empty()) {
42334225
// Remap all the paths if requested.
42344226
llvm::PrefixMapper Mapper;
4235-
clang::tooling::dependencies::DepscanPrefixMapping::configurePrefixMapper(
4236-
Impl.SwiftContext.SearchPathOpts.ScannerPrefixMapper, Mapper);
4227+
SmallVector<llvm::MappedPrefix> Prefixes;
4228+
if (auto E = llvm::MappedPrefix::transformJoined(
4229+
Impl.SwiftContext.SearchPathOpts.ScannerPrefixMapper, Prefixes)) {
4230+
// Take permanent ownership of this string. In general the diagnostic
4231+
// might outlive this function.
4232+
auto errorMessage =
4233+
Impl.SwiftContext.AllocateCopy(llvm::toString(std::move(E)));
4234+
Impl.SwiftContext.Diags.diagnose(SourceLoc(), diag::error_prefix_mapping,
4235+
errorMessage);
4236+
}
4237+
Mapper.addRange(Prefixes);
4238+
Mapper.sort();
4239+
42374240
clang::tooling::dependencies::DepscanPrefixMapping::remapInvocationPaths(
42384241
instance, Mapper);
42394242
instance.getFrontendOpts().PathPrefixMappings.clear();

lib/ClangImporter/ClangIncludePaths.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ ClangImporter::createClangDriver(
130130

131131
auto diagVFS = vfs ? vfs : llvm::vfs::getRealFileSystem();
132132

133+
clang::DiagnosticOptions diagOpts;
133134
auto *silentDiagConsumer = new clang::DiagnosticConsumer();
134135
auto clangDiags = clang::CompilerInstance::createDiagnostics(
135-
*diagVFS, new clang::DiagnosticOptions(), silentDiagConsumer);
136+
*diagVFS, diagOpts, silentDiagConsumer);
136137
clang::driver::Driver clangDriver(ClangImporterOpts.clangPath,
137138
LangOpts.Target.str(), *clangDiags,
138139
"clang LLVM compiler", vfs);

lib/ClangImporter/ClangModuleDependencyScanner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ void ClangImporter::getBridgingHeaderOptions(
228228
// Round-trip clang args to canonicalize and clear the options that swift
229229
// compiler doesn't need.
230230
clang::CompilerInvocation depsInvocation;
231-
clang::DiagnosticsEngine clangDiags(new clang::DiagnosticIDs(),
232-
new clang::DiagnosticOptions(),
231+
clang::DiagnosticOptions diagOpts;
232+
clang::DiagnosticsEngine clangDiags(new clang::DiagnosticIDs(), diagOpts,
233233
new clang::IgnoringDiagConsumer());
234234

235235
llvm::SmallVector<const char *> clangArgs;

lib/ClangImporter/ImportDecl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4219,14 +4219,14 @@ namespace {
42194219
for (auto param : attr->params()) {
42204220
// FIXME: Swift assumes no escaping to globals. We should diagnose
42214221
// this.
4222-
if (param == clang::LifetimeCaptureByAttr::GLOBAL ||
4223-
param == clang::LifetimeCaptureByAttr::UNKNOWN ||
4224-
param == clang::LifetimeCaptureByAttr::INVALID)
4222+
if (param == clang::LifetimeCaptureByAttr::Global ||
4223+
param == clang::LifetimeCaptureByAttr::Unknown ||
4224+
param == clang::LifetimeCaptureByAttr::Invalid)
42254225
continue;
42264226

42274227
paramHasAnnotation[idx] = true;
42284228
if (isa<clang::CXXMethodDecl>(decl) &&
4229-
param == clang::LifetimeCaptureByAttr::THIS) {
4229+
param == clang::LifetimeCaptureByAttr::This) {
42304230
auto [it, inserted] = inheritedArgDependences.try_emplace(
42314231
result->getSelfIndex(), SmallBitVector(dependencyVecSize));
42324232
it->second[idx] = true;

lib/ClangImporter/ImportMacro.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ static ValueDecl *importMacro(ClangImporter::Implementation &impl,
620620
clang::LookupResult R(S, {{tok.getIdentifierInfo()}, {}},
621621
clang::Sema::LookupAnyName);
622622
if (S.LookupName(R, S.TUScope))
623-
if (R.getResultKind() == clang::LookupResult::LookupResultKind::Found)
623+
if (R.getResultKind() == clang::LookupResultKind::Found)
624624
if (const auto *VD = dyn_cast<clang::ValueDecl>(R.getFoundDecl()))
625625
return importDeclAlias(impl, DC, VD, name);
626626
}

0 commit comments

Comments
 (0)