Skip to content

Commit

Permalink
Fix PROTOBUF_CONSTINIT macro redifinition
Browse files Browse the repository at this point in the history
The #ifdef block is duplicated with the above (which was fixed in 3.15.1).

It would be great to have this fix backported to 3.15.1 (and released as 3.15.2).
  • Loading branch information
georgthegreat authored and acozzette committed Feb 23, 2021
1 parent 2ff31d3 commit 09f94e7
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/google/protobuf/port_def.inc
Original file line number Diff line number Diff line change
Expand Up @@ -575,17 +575,6 @@
#define PROTOBUF_CONSTINIT
#endif

#if defined(__cpp_constinit)
#define PROTOBUF_CONSTINIT constinit
#elif defined(__has_cpp_attribute)
#if __has_cpp_attribute(clang::require_constant_initialization)
#define PROTOBUF_CONSTINIT [[clang::require_constant_initialization]]
#endif
#endif
#ifndef PROTOBUF_CONSTINIT
#define PROTOBUF_CONSTINIT
#endif

// Some globals with an empty non-trivial destructor are annotated with
// no_destroy for performance reasons. It reduces the cost of these globals in
// non-opt mode and under sanitizers.
Expand Down

0 comments on commit 09f94e7

Please sign in to comment.