Inline a trivial clear() method.

llvm-svn: 157114
This commit is contained in:
Benjamin Kramer 2012-05-19 14:28:31 +00:00
parent f928534ef2
commit 9012a09b1c
2 changed files with 6 additions and 11 deletions

View File

@ -853,12 +853,14 @@ public:
assert(Other.Kind == IK_Identifier && "Cannot copy non-identifiers");
}
/// \brief Destroy this unqualified-id.
~UnqualifiedId() { clear(); }
/// \brief Clear out this unqualified-id, setting it to default (invalid)
/// state.
void clear();
void clear() {
Kind = IK_Identifier;
Identifier = 0;
StartLocation = SourceLocation();
EndLocation = SourceLocation();
}
/// \brief Determine whether this unqualified-id refers to a valid name.
bool isValid() const { return StartLocation.isValid(); }

View File

@ -935,13 +935,6 @@ bool DeclSpec::isMissingDeclaratorOk() {
StorageClassSpec != DeclSpec::SCS_typedef;
}
void UnqualifiedId::clear() {
Kind = IK_Identifier;
Identifier = 0;
StartLocation = SourceLocation();
EndLocation = SourceLocation();
}
void UnqualifiedId::setOperatorFunctionId(SourceLocation OperatorLoc,
OverloadedOperatorKind Op,
SourceLocation SymbolLocations[3]) {