You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
observe error: 'no_destroy' attribute cannot be applied to types in basically any generated pb source file (and some non-generated ones)
What did you expect to see
No errors, hopefully. It would be nice. It worked up until now.
What did you see instead?
Compilation failures. One possible result:
src/google/protobuf/duration.pb.cc:32:20: error: 'no_destroy' attribute cannot be applied to types
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_NO_DESTROY DurationDefaultTypeInternal _Duration_default_instance_;
^
src/google/protobuf/port_def.inc:592:41: note: expanded from macro 'PROTOBUF_ATTRIBUTE_NO_DESTROY'
#define PROTOBUF_ATTRIBUTE_NO_DESTROY [[clang::no_destroy]]
^
Anything else we should know about your project / environment
Nothing that comes to mind. It's unclear what the problem is here exactly, whether this is misbehavior by LLVM or a mistake in the protobuf library; from what I can tell based on the documentation this does look like the right way to use the annotation.
The text was updated successfully, but these errors were encountered:
What version of protobuf and what language are you using?
Version: master, first appearing in commit a001250
Language: C++
What operating system (Linux, Windows, ...) and version?
linux (ubuntu 20.10)
What runtime / compiler are you using (e.g., python version or gcc version)
clang 11.0.0-2 in C++2a standard
What did you do?
Steps to reproduce the behavior:
CC=clang bazel build --cxxopt='-std=c++2a' //:protobuf
error: 'no_destroy' attribute cannot be applied to types
in basically any generated pb source file (and some non-generated ones)What did you expect to see
No errors, hopefully. It would be nice. It worked up until now.
What did you see instead?
Compilation failures. One possible result:
Anything else we should know about your project / environment
Nothing that comes to mind. It's unclear what the problem is here exactly, whether this is misbehavior by LLVM or a mistake in the protobuf library; from what I can tell based on the documentation this does look like the right way to use the annotation.
The text was updated successfully, but these errors were encountered: