[pigeon] Fix C++ config handling (#3094)

* Fix config names

* Version bump
diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md
index 94dff6c..891bce4 100644
--- a/packages/pigeon/CHANGELOG.md
+++ b/packages/pigeon/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 7.1.1
+
+* [c++] Fixes handling of the `cpp*` options in `@ConfigurePigeon` annotations.
+
 ## 7.1.0
 
 * Adds `@SwiftFunction` annotation for specifying custom swift function signature.
diff --git a/packages/pigeon/lib/generator_tools.dart b/packages/pigeon/lib/generator_tools.dart
index 2618648..784b201 100644
--- a/packages/pigeon/lib/generator_tools.dart
+++ b/packages/pigeon/lib/generator_tools.dart
@@ -11,7 +11,7 @@
 /// The current version of pigeon.
 ///
 /// This must match the version in pubspec.yaml.
-const String pigeonVersion = '7.1.0';
+const String pigeonVersion = '7.1.1';
 
 /// Read all the content from [stdin] to a String.
 String readStdin() {
diff --git a/packages/pigeon/lib/pigeon_lib.dart b/packages/pigeon/lib/pigeon_lib.dart
index 58fb6bb..6389a8e 100644
--- a/packages/pigeon/lib/pigeon_lib.dart
+++ b/packages/pigeon/lib/pigeon_lib.dart
@@ -274,11 +274,10 @@
       kotlinOptions: map.containsKey('kotlinOptions')
           ? KotlinOptions.fromMap(map['kotlinOptions']! as Map<String, Object>)
           : null,
-      cppHeaderOut: map['experimental_cppHeaderOut'] as String?,
-      cppSourceOut: map['experimental_cppSourceOut'] as String?,
-      cppOptions: map.containsKey('experimental_cppOptions')
-          ? CppOptions.fromMap(
-              map['experimental_cppOptions']! as Map<String, Object>)
+      cppHeaderOut: map['cppHeaderOut'] as String?,
+      cppSourceOut: map['cppSourceOut'] as String?,
+      cppOptions: map.containsKey('cppOptions')
+          ? CppOptions.fromMap(map['cppOptions']! as Map<String, Object>)
           : null,
       dartOptions: map.containsKey('dartOptions')
           ? DartOptions.fromMap(map['dartOptions']! as Map<String, Object>)
@@ -306,9 +305,9 @@
       if (swiftOptions != null) 'swiftOptions': swiftOptions!.toMap(),
       if (kotlinOut != null) 'kotlinOut': kotlinOut!,
       if (kotlinOptions != null) 'kotlinOptions': kotlinOptions!.toMap(),
-      if (cppHeaderOut != null) 'experimental_cppHeaderOut': cppHeaderOut!,
-      if (cppSourceOut != null) 'experimental_cppSourceOut': cppSourceOut!,
-      if (cppOptions != null) 'experimental_cppOptions': cppOptions!.toMap(),
+      if (cppHeaderOut != null) 'cppHeaderOut': cppHeaderOut!,
+      if (cppSourceOut != null) 'cppSourceOut': cppSourceOut!,
+      if (cppOptions != null) 'cppOptions': cppOptions!.toMap(),
       if (dartOptions != null) 'dartOptions': dartOptions!.toMap(),
       if (copyrightHeader != null) 'copyrightHeader': copyrightHeader!,
       if (astOut != null) 'astOut': astOut!,
diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java
index 6f031f3..3c8cb33 100644
--- a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java
+++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.0), do not edit directly.
+// Autogenerated from Pigeon (v7.1.1), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 package com.example.alternate_language_test_plugin;
diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h
index 76982b5..24cccf7 100644
--- a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h
+++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.0), do not edit directly.
+// Autogenerated from Pigeon (v7.1.1), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 #import <Foundation/Foundation.h>
diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m
index ad54c14..1a5bf69 100644
--- a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m
+++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.0), do not edit directly.
+// Autogenerated from Pigeon (v7.1.1), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 #import "CoreTests.gen.h"
diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart
index 1768c37..4db24a8 100644
--- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart
+++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.0), do not edit directly.
+// Autogenerated from Pigeon (v7.1.1), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
 
diff --git a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt
index ef56298..81ddf7f 100644
--- a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt
+++ b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt
@@ -1,8 +1,8 @@
 // Copyright 2013 The Flutter Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-// 
-// Autogenerated from Pigeon (v7.1.0), do not edit directly.
+//
+// Autogenerated from Pigeon (v7.1.1), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 package com.example.test_plugin
diff --git a/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift
index 0f33912..5bf806e 100644
--- a/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift
+++ b/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift
@@ -1,8 +1,8 @@
 // Copyright 2013 The Flutter Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-// 
-// Autogenerated from Pigeon (v7.1.0), do not edit directly.
+//
+// Autogenerated from Pigeon (v7.1.1), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 import Foundation
@@ -110,23 +110,23 @@
   var aNullableString: String? = nil
 
   static func fromList(_ list: [Any?]) -> AllNullableTypes? {
-    let aNullableBool = list[0] as? Bool 
-    let aNullableInt = list[1] as? Int32 
-    let aNullableDouble = list[2] as? Double 
-    let aNullableByteArray = list[3] as? FlutterStandardTypedData 
-    let aNullable4ByteArray = list[4] as? FlutterStandardTypedData 
-    let aNullable8ByteArray = list[5] as? FlutterStandardTypedData 
-    let aNullableFloatArray = list[6] as? FlutterStandardTypedData 
-    let aNullableList = list[7] as? [Any?] 
-    let aNullableMap = list[8] as? [AnyHashable: Any?] 
-    let nullableNestedList = list[9] as? [[Bool?]?] 
-    let nullableMapWithAnnotations = list[10] as? [String?: String?] 
-    let nullableMapWithObject = list[11] as? [String?: Any?] 
+    let aNullableBool = list[0] as? Bool
+    let aNullableInt = list[1] as? Int32
+    let aNullableDouble = list[2] as? Double
+    let aNullableByteArray = list[3] as? FlutterStandardTypedData
+    let aNullable4ByteArray = list[4] as? FlutterStandardTypedData
+    let aNullable8ByteArray = list[5] as? FlutterStandardTypedData
+    let aNullableFloatArray = list[6] as? FlutterStandardTypedData
+    let aNullableList = list[7] as? [Any?]
+    let aNullableMap = list[8] as? [AnyHashable: Any?]
+    let nullableNestedList = list[9] as? [[Bool?]?]
+    let nullableMapWithAnnotations = list[10] as? [String?: String?]
+    let nullableMapWithObject = list[11] as? [String?: Any?]
     var aNullableEnum: AnEnum? = nil
     if let aNullableEnumRawValue = list[12] as? Int {
       aNullableEnum = AnEnum(rawValue: aNullableEnumRawValue)
     }
-    let aNullableString = list[13] as? String 
+    let aNullableString = list[13] as? String
 
     return AllNullableTypes(
       aNullableBool: aNullableBool,
diff --git a/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift
index 0f33912..5bf806e 100644
--- a/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift
+++ b/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift
@@ -1,8 +1,8 @@
 // Copyright 2013 The Flutter Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-// 
-// Autogenerated from Pigeon (v7.1.0), do not edit directly.
+//
+// Autogenerated from Pigeon (v7.1.1), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 import Foundation
@@ -110,23 +110,23 @@
   var aNullableString: String? = nil
 
   static func fromList(_ list: [Any?]) -> AllNullableTypes? {
-    let aNullableBool = list[0] as? Bool 
-    let aNullableInt = list[1] as? Int32 
-    let aNullableDouble = list[2] as? Double 
-    let aNullableByteArray = list[3] as? FlutterStandardTypedData 
-    let aNullable4ByteArray = list[4] as? FlutterStandardTypedData 
-    let aNullable8ByteArray = list[5] as? FlutterStandardTypedData 
-    let aNullableFloatArray = list[6] as? FlutterStandardTypedData 
-    let aNullableList = list[7] as? [Any?] 
-    let aNullableMap = list[8] as? [AnyHashable: Any?] 
-    let nullableNestedList = list[9] as? [[Bool?]?] 
-    let nullableMapWithAnnotations = list[10] as? [String?: String?] 
-    let nullableMapWithObject = list[11] as? [String?: Any?] 
+    let aNullableBool = list[0] as? Bool
+    let aNullableInt = list[1] as? Int32
+    let aNullableDouble = list[2] as? Double
+    let aNullableByteArray = list[3] as? FlutterStandardTypedData
+    let aNullable4ByteArray = list[4] as? FlutterStandardTypedData
+    let aNullable8ByteArray = list[5] as? FlutterStandardTypedData
+    let aNullableFloatArray = list[6] as? FlutterStandardTypedData
+    let aNullableList = list[7] as? [Any?]
+    let aNullableMap = list[8] as? [AnyHashable: Any?]
+    let nullableNestedList = list[9] as? [[Bool?]?]
+    let nullableMapWithAnnotations = list[10] as? [String?: String?]
+    let nullableMapWithObject = list[11] as? [String?: Any?]
     var aNullableEnum: AnEnum? = nil
     if let aNullableEnumRawValue = list[12] as? Int {
       aNullableEnum = AnEnum(rawValue: aNullableEnumRawValue)
     }
-    let aNullableString = list[13] as? String 
+    let aNullableString = list[13] as? String
 
     return AllNullableTypes(
       aNullableBool: aNullableBool,
diff --git a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp
index 94b9a49..85afe61 100644
--- a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp
+++ b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.0), do not edit directly.
+// Autogenerated from Pigeon (v7.1.1), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 #undef _HAS_EXCEPTIONS
diff --git a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h
index 51f6e21..eab4bdd 100644
--- a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h
+++ b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Autogenerated from Pigeon (v7.1.0), do not edit directly.
+// Autogenerated from Pigeon (v7.1.1), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 #ifndef PIGEON_CORE_TESTS_GEN_H_
diff --git a/packages/pigeon/pubspec.yaml b/packages/pigeon/pubspec.yaml
index b779f0a..351b71b 100644
--- a/packages/pigeon/pubspec.yaml
+++ b/packages/pigeon/pubspec.yaml
@@ -2,7 +2,7 @@
 description: Code generator tool to make communication between Flutter and the host platform type-safe and easier.
 repository: https://github.com/flutter/packages/tree/main/packages/pigeon
 issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3Apigeon
-version: 7.1.0 # This must match the version in lib/generator_tools.dart
+version: 7.1.1 # This must match the version in lib/generator_tools.dart
 
 environment:
   sdk: ">=2.12.0 <3.0.0"