mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix 2 leftover rebranch warnings
``` lib/Index/Index.cpp:137:41: warning: returning address of local temporary object [-Wreturn-stack-address] lib/Sema/ImportResolution.cpp:627:9: warning: 'AttributedImport' may not intend to support class template argument deduction [-Wctad-maybe-unsupported] ```
This commit is contained in:
@@ -134,8 +134,12 @@ public:
|
||||
}
|
||||
|
||||
ArrayRef<FileUnit *> getFiles() const {
|
||||
return isa<SourceFile *>(SFOrMod) ? *SFOrMod.getAddrOfPtr1()
|
||||
: cast<ModuleDecl *>(SFOrMod)->getFiles();
|
||||
if (isa<SourceFile *>(SFOrMod)) {
|
||||
SourceFile *const *SF = SFOrMod.getAddrOfPtr1();
|
||||
return ArrayRef((FileUnit *const *)SF, 1);
|
||||
} else {
|
||||
return cast<ModuleDecl *>(SFOrMod)->getFiles();
|
||||
}
|
||||
}
|
||||
|
||||
StringRef getFilename() const {
|
||||
|
||||
@@ -623,8 +623,7 @@ void ImportResolver::addImplicitImports() {
|
||||
const ModuleDecl *moduleToInherit = nullptr;
|
||||
if (underlyingClangModule) {
|
||||
moduleToInherit = underlyingClangModule;
|
||||
boundImports.push_back(
|
||||
AttributedImport(ImportedModule(underlyingClangModule)));
|
||||
boundImports.emplace_back(ImportedModule(underlyingClangModule));
|
||||
} else {
|
||||
moduleToInherit = SF.getParentModule();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user