unaccepted-pr9977-cxx20-keywords.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 43f60b1d59c458749fc947b3c5ddbb36b234d5af Mon Sep 17 00:00:00 2001
  2. From: Keith Smiley <keithbsmiley@gmail.com>
  3. Date: Mon, 16 May 2022 10:25:38 -0700
  4. Subject: [PATCH] Add new C++ 20 keywords
  5. Discovered in https://github.com/envoyproxy/envoy/issues/21010
  6. ---
  7. src/google/protobuf/compiler/cpp/helpers.cc | 6 +++++-
  8. 1 file changed, 5 insertions(+), 1 deletion(-)
  9. diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
  10. index 4b7c5c9d91..e17cc9c66c 100644
  11. --- a/src/google/protobuf/compiler/cpp/helpers.cc
  12. +++ b/src/google/protobuf/compiler/cpp/helpers.cc
  13. @@ -93,9 +93,12 @@ static const char* const kKeywordList[] = { //
  14. "char",
  15. "class",
  16. "compl",
  17. + "concept",
  18. "const",
  19. - "constexpr",
  20. "const_cast",
  21. + "consteval",
  22. + "constexpr",
  23. + "constinit",
  24. "continue",
  25. "decltype",
  26. "default",
  27. @@ -132,6 +135,7 @@ static const char* const kKeywordList[] = { //
  28. "public",
  29. "register",
  30. "reinterpret_cast",
  31. + "requires",
  32. "return",
  33. "short",
  34. "signed",