mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILOptimizer: rename cdecl to ctor (NFC)
`cdecl` is a keyword in the non-conforming C++ dialect used on Windows which expands to `__cdecl`. Simply rename the variable to avoid the replacement. Although it is possible to `#undef cdecl`, renaming makes it less confusing for non-Windows developers.
This commit is contained in:
@@ -792,10 +792,10 @@ bool isAutoGeneratedInitOfOSLogMessage(SILFunction &fun) {
|
||||
Decl *decl = declContext->getAsDecl();
|
||||
if (!decl)
|
||||
return false;
|
||||
ConstructorDecl *cdecl = dyn_cast<ConstructorDecl>(decl);
|
||||
if (!cdecl)
|
||||
ConstructorDecl *ctor = dyn_cast<ConstructorDecl>(decl);
|
||||
if (!ctor)
|
||||
return false;
|
||||
DeclContext *parentContext = cdecl->getParent();
|
||||
DeclContext *parentContext = ctor->getParent();
|
||||
if (!parentContext)
|
||||
return false;
|
||||
NominalTypeDecl *typeDecl = parentContext->getSelfNominalTypeDecl();
|
||||
|
||||
Reference in New Issue
Block a user