From 893e2d7fd8513f3b7b30d863b05416bd6cf5f432 Mon Sep 17 00:00:00 2001 From: Yuhanun Citgez Date: Sun, 14 Feb 2021 16:08:49 +0100 Subject: [PATCH] Resolved an issue where NO_DESTROY and CONSTINIT were in incorrect order --- src/google/protobuf/compiler/cpp/cpp_file.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc index 6d4412b22ad8..70941d8b9bee 100644 --- a/src/google/protobuf/compiler/cpp/cpp_file.cc +++ b/src/google/protobuf/compiler/cpp/cpp_file.cc @@ -454,7 +454,7 @@ void FileGenerator::GenerateSourceDefaultInstance(int idx, // enough. However, the empty destructor fails to be elided in some // configurations (like non-opt or with certain sanitizers). NO_DESTROY is // there just to improve performance and binary size in these builds. - format("PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_NO_DESTROY $1$ $2$;\n", + format("PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT $1$ $2$;\n", DefaultInstanceType(generator->descriptor_, options_), DefaultInstanceName(generator->descriptor_, options_));