Skip to content

Commit eef2764

Browse files
Yuhanunacozzette
authored andcommitted
Resolved an issue where NO_DESTROY and CONSTINIT were in incorrect order
1 parent 0040102 commit eef2764

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/google/protobuf/compiler/cpp/cpp_file.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ void FileGenerator::GenerateSourceDefaultInstance(int idx,
454454
// enough. However, the empty destructor fails to be elided in some
455455
// configurations (like non-opt or with certain sanitizers). NO_DESTROY is
456456
// there just to improve performance and binary size in these builds.
457-
format("PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_NO_DESTROY $1$ $2$;\n",
457+
format("PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT $1$ $2$;\n",
458458
DefaultInstanceType(generator->descriptor_, options_),
459459
DefaultInstanceName(generator->descriptor_, options_));
460460

0 commit comments

Comments
 (0)