Skip to content

Commit a174e57

Browse files
[Gardening] Update clang-function-type-serialization comments.
We have landed support for serialization Clang function types, but there is still work to be done here. Moreover, we should use a consistent style with `[(FIXME|TODO|NOTE): label]`, instead of using different styles throughout the code.
1 parent 3cb8f9b commit a174e57

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

include/swift/AST/PrintOptions.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,7 @@ struct PrintOptions {
327327
};
328328

329329
/// Whether to print function @convention attribute on function types.
330-
// FIXME: [clang-function-type-serialization] Once we start serializing Clang
331-
// types, we should also start printing the full type in the swiftinterface.
330+
// [TODO: Clang-type-plumbing] Print the full type in the swiftinterface.
332331
FunctionRepresentationMode PrintFunctionRepresentationAttrs =
333332
FunctionRepresentationMode::NameOnly;
334333

include/swift/AST/Types.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3013,8 +3013,7 @@ class AnyFunctionType : public TypeBase {
30133013
static void assertIsFunctionType(const clang::Type *);
30143014

30153015
ExtInfo(unsigned Bits, Uncommon Other) : Bits(Bits), Other(Other) {
3016-
// TODO: [clang-function-type-serialization] Once we start serializing
3017-
// the Clang type, we should also assert that the pointer is non-null.
3016+
// [TODO: Clang-type-plumbing] Assert that the pointer is non-null.
30183017
auto Rep = Representation(Bits & RepresentationMask);
30193018
if ((Rep == Representation::CFunctionPointer) && Other.ClangFunctionType)
30203019
assertIsFunctionType(Other.ClangFunctionType);

include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@ namespace swift {
274274
/// Use Clang function types for computing canonical types.
275275
/// If this option is false, the clang function types will still be computed
276276
/// but will not be used for checking type equality.
277-
/// FIXME: [clang-function-type-serialization] This option should be turned
278-
/// on once we start serializing clang function types.
277+
/// [TODO: Clang-type-plumbing] Turn on for feature rollout.
279278
bool UseClangFunctionTypes = false;
280279

281280
/// Whether to use the import as member inference system

include/swift/Frontend/ModuleInterfaceSupport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct ModuleInterfaceOptions {
3333
bool PreserveTypesAsWritten = false;
3434

3535
/// Should we emit the cType when printing @convention(c) or no?
36-
/// FIXME: [clang-function-type-serialization] This check should go away.
36+
/// [TODO: Clang-type-plumbing] This check should go away.
3737
bool PrintFullConvention = false;
3838

3939
/// Copy of all the command-line flags passed at .swiftinterface

lib/AST/ASTPrinter.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4019,8 +4019,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
40194019
break;
40204020
case SILFunctionType::Representation::CFunctionPointer:
40214021
Printer << "c";
4022-
// FIXME: [clang-function-type-serialization] Once we start serializing
4023-
// Clang function types, we should be able to remove the second check.
4022+
// [TODO: Clang-type-plumbing] Remove the second check.
40244023
if (printNameOnly || !info.getUncommonInfo().hasValue())
40254024
break;
40264025
printCType(Ctx, Printer, info);
@@ -4086,8 +4085,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
40864085
break;
40874086
case SILFunctionType::Representation::CFunctionPointer:
40884087
Printer << "c";
4089-
// FIXME: [clang-function-type-serialization] Once we start serializing
4090-
// Clang function types, we should be able to remove the second check.
4088+
// [TODO: Clang-type-plumbing] Remove the second check.
40914089
if (printNameOnly || !info.getUncommonInfo().hasValue())
40924090
break;
40934091
printCType(Ctx, Printer, info);

0 commit comments

Comments
 (0)