Skip to content

Commit b034870

Browse files
committed
Serialization: scope declaration properly (NFC)
Annotating the namespace on a class is a clang extension. Use `namespace` to enclose the type to a namespace. This was flagged by GCC 7.
1 parent 746b58e commit b034870

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/Serialization/Deserialization.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,7 +2221,8 @@ Decl *ModuleFile::getDecl(DeclID DID) {
22212221
}
22222222

22232223
/// Used to split up methods that would otherwise live in ModuleFile.
2224-
class swift::DeclDeserializer {
2224+
namespace swift {
2225+
class DeclDeserializer {
22252226
template <typename T>
22262227
using Serialized = ModuleFile::Serialized<T>;
22272228
using TypeID = serialization::TypeID;
@@ -3873,6 +3874,7 @@ class swift::DeclDeserializer {
38733874
return dtor;
38743875
}
38753876
};
3877+
}
38763878

38773879
Expected<Decl *>
38783880
ModuleFile::getDeclChecked(
@@ -4513,7 +4515,8 @@ Type ModuleFile::getType(TypeID TID) {
45134515
return deserialized.get();
45144516
}
45154517

4516-
class swift::TypeDeserializer {
4518+
namespace swift {
4519+
class TypeDeserializer {
45174520
using TypeID = serialization::TypeID;
45184521

45194522
ModuleFile &MF;
@@ -5290,6 +5293,7 @@ class swift::TypeDeserializer {
52905293
return UnboundGenericType::get(genericDecl, parentTy, ctx);
52915294
}
52925295
};
5296+
}
52935297

52945298
Expected<Type> ModuleFile::getTypeChecked(TypeID TID) {
52955299
if (TID == 0)

0 commit comments

Comments
 (0)