mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Swift: strip parameters from lazy function decl trap names
This commit is contained in:
@@ -59,9 +59,8 @@ static fs::path getFilename(swift::ModuleDecl& module,
|
||||
std::string ret;
|
||||
ret += module.getRealName().str();
|
||||
ret += '_';
|
||||
llvm::SmallVector<char> scratch;
|
||||
// lazyDeclaration must be a ValueDecl, as already asserted in SwiftMangler::mangledName
|
||||
ret += llvm::cast<swift::ValueDecl>(lazyDeclaration)->getName().getString(scratch);
|
||||
ret += llvm::cast<swift::ValueDecl>(lazyDeclaration)->getBaseName().userFacingName();
|
||||
ret += '_';
|
||||
// half a SHA2 is enough
|
||||
ret += std::string_view(mangled).substr(0, mangled.size() / 2);
|
||||
|
||||
Reference in New Issue
Block a user