getDeclarationList is used only for read-only access to the array. I don't think it's actually meant to return by value.
DiagnosticOptions