omitNeedlessWords: sink helper enum into .cpp file

No functionality change.
This commit is contained in:
Jordan Rose
2019-10-09 20:01:29 -07:00
parent 3fdbd1b154
commit 42f7a35c4d
2 changed files with 21 additions and 19 deletions

View File

@@ -576,6 +576,27 @@ static bool textMatchesPropertyName(StringRef text,
return false;
}
namespace {
/// Describes the role that a particular name has within a
/// signature, which can affect how we omit needless words.
enum class NameRole {
/// The base name of a function or method.
BaseName,
/// The first parameter of a function or method.
FirstParameter,
// Subsequent parameters in a function or method.
SubsequentParameter,
// The name of a property.
Property,
// A partial name; used internally.
Partial,
};
} // end anonymous namespace
static StringRef omitNeedlessWords(StringRef name,
OmissionTypeName typeName,
NameRole role,