mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[embedded] Print function name + class name when missing loc in 'non-final generic fuctions' diagnostic
This commit is contained in:
@@ -98,6 +98,14 @@ bool VTableSpecializer::specializeVTables(SILModule &module) {
|
||||
ValueDecl *decl = entry.getMethod().getDecl();
|
||||
module.getASTContext().Diags.diagnose(
|
||||
decl->getLoc(), diag::non_final_generic_class_function);
|
||||
|
||||
if (decl->getLoc().isInvalid()) {
|
||||
auto demangledName = Demangle::demangleSymbolAsString(
|
||||
method->getName(),
|
||||
Demangle::DemangleOptions::SimplifiedUIDemangleOptions());
|
||||
llvm::errs() << "in function " << demangledName << "\n";
|
||||
llvm::errs() << "in class " << vtable->getClass()->getName() << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user