[llvm-branch-commits] [clang] [clang] NFC: introduce UnsignedOrNone as a replacement for std::optional<unsigned> (PR #134142)

Younan Zhang via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Apr 2 17:20:10 PDT 2025


================
@@ -13343,28 +13344,25 @@ class Sema final : public SemaBase {
   /// The current index into pack expansion arguments that will be
   /// used for substitution of parameter packs.
   ///
-  /// The pack expansion index will be -1 to indicate that parameter packs
+  /// The pack expansion index will be none to indicate that parameter packs
   /// should be instantiated as themselves. Otherwise, the index specifies
   /// which argument within the parameter pack will be used for substitution.
-  int ArgumentPackSubstitutionIndex;
+  UnsignedOrNone ArgPackSubstIndex;
 
   /// RAII object used to change the argument pack substitution index
   /// within a \c Sema object.
   ///
-  /// See \c ArgumentPackSubstitutionIndex for more information.
-  class ArgumentPackSubstitutionIndexRAII {
+  /// See \c ArgPackSubstIndex for more information.
+  class ArgPackSubstIndexRAII {
----------------
zyn0217 wrote:

Did you rename it because it was too long to write?

https://github.com/llvm/llvm-project/pull/134142


More information about the llvm-branch-commits mailing list