Repository: apple/swift
File: include/swift/AST/Decl.h (C/C++)

Code before:
                  SourceLoc EqualsLoc,
                  Expr *RawValueExpr,
                  DeclContext *DC);

  /// Returns the string for the base name, or "_" if this is unnamed.
  StringRef getNameStr() const {
    assert(!getName().isSpecial() && "Cannot get string for special names");
    return hasName() ? getBaseIdentifier().str() : "_";
  }

  /// Retrieve the payload type for the enum element, which is a tuple of the
  /// associated values, or null if there are no associated values.
  Type getPayloadInterfaceType() const;

  /// Retrieve the parameters of the implicit case constructor for the enum
  /// element.
  ArrayRef<AnyFunctionType::Param> getCaseConstructorParams() const;

  void setParameterList(ParameterList *params);
  ParameterList *getParameterList() const { return Params; }

  /// Retrieves a raw value expression associated with this enum element, if it
  /// exists, as it was written in the source.
  Expr *getOriginalRawValueExpr() const;

  /// Retrieves a fully-typechecked and constant-folded raw value expression
  /// associated with this enum element, if it exists.
  LiteralExpr *getRawValueExpr() const;

  /// Reset the raw value expression.
  void setRawValueExpr(Expr *e);

  /// Return the containing EnumDecl.
  EnumDecl *getParentEnum() const {
    return cast<EnumDecl>(getDeclContext());
  }
  
  /// Return the containing EnumCaseDecl.
  EnumCaseDecl *getParentCase() const;

  SourceLoc getStartLoc() const {
    return getNameLoc();
  }
  SourceRange getSourceRange() const;
  
  bool hasAssociatedValues() const {
    return getParameterList() != nullptr;
  }

  /// True if the case is marked 'indirect'.
  bool isIndirect() const {

Review comment (suggestion):
The `constant-folded` bit is controlled by the feature flag, should probably mention it here too.

Code after:
                  SourceLoc EqualsLoc,
                  Expr *RawValueExpr,
                  DeclContext *DC);

  /// Returns the string for the base name, or "_" if this is unnamed.
  StringRef getNameStr() const {
    assert(!getName().isSpecial() && "Cannot get string for special names");
    return hasName() ? getBaseIdentifier().str() : "_";
  }

  /// Retrieve the payload type for the enum element, which is a tuple of the
  /// associated values, or null if there are no associated values.
  Type getPayloadInterfaceType() const;

  /// Retrieve the parameters of the implicit case constructor for the enum
  /// element.
  ArrayRef<AnyFunctionType::Param> getCaseConstructorParams() const;

  void setParameterList(ParameterList *params);
  ParameterList *getParameterList() const { return Params; }

  /// Retrieves a raw value expression associated with this enum element, if it
  /// exists, as it was written in the source.
  Expr *getOriginalRawValueExpr() const;

  /// Retrieves a fully-typechecked and (if LiteralExpressions experimental
  /// feature is enabled) constant-folded raw value expression associated with
  /// this enum element, if it exists.
  LiteralExpr *getRawValueExpr() const;

  /// Reset the raw value expression.
  void setRawValueExpr(Expr *e);

  /// Return the containing EnumDecl.
  EnumDecl *getParentEnum() const {
    return cast<EnumDecl>(getDeclContext());
  }
  
  /// Return the containing EnumCaseDecl.
  EnumCaseDecl *getParentCase() const;

  SourceLoc getStartLoc() const {
    return getNameLoc();
  }
  SourceRange getSourceRange() const;
  
  bool hasAssociatedValues() const {
    return getParameterList() != nullptr;
  }

  /// True if the case is marked 'indirect'.