File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,10 @@ void DeclAndTypeClangFunctionPrinter::printFunctionSignature(
221
221
};
222
222
223
223
// Print any modifiers before the signature.
224
+ if (modifiers.isStatic ) {
225
+ assert (!modifiers.isConst );
226
+ os << " static " ;
227
+ }
224
228
if (modifiers.isInline )
225
229
os << " inline " ;
226
230
@@ -469,13 +473,11 @@ void DeclAndTypeClangFunctionPrinter::printCxxMethod(
469
473
StringRef swiftSymbolName, Type resultTy, bool isDefinition) {
470
474
bool isConstructor = isa<ConstructorDecl>(FD);
471
475
os << " " ;
472
- if (isConstructor && !isDefinition)
473
- os << " static " ;
474
476
475
- // FIXME: Full qualifier.
476
477
FunctionSignatureModifiers modifiers;
477
478
if (isDefinition)
478
479
modifiers.qualifierContext = typeDeclContext;
480
+ modifiers.isStatic = isConstructor && !isDefinition;
479
481
modifiers.isInline = true ;
480
482
bool isMutating =
481
483
isa<FuncDecl>(FD) ? cast<FuncDecl>(FD)->isMutating () : false ;
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class DeclAndTypeClangFunctionPrinter {
65
65
struct FunctionSignatureModifiers {
66
66
// / Additional qualifier to add before the function's name.
67
67
const NominalTypeDecl *qualifierContext = nullptr ;
68
+ bool isStatic = false ;
68
69
bool isInline = false ;
69
70
bool isConst = false ;
70
71
You can’t perform that action at this time.
0 commit comments