From: Benjamin Kramer Date: Sat, 19 May 2012 14:28:31 +0000 (+0000) Subject: Inline a trivial clear() method. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2010ee042f3a370b15fda7872b86c914ffad4d2;p=clang Inline a trivial clear() method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157114 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Sema/DeclSpec.h b/include/clang/Sema/DeclSpec.h index 67fd3939f3..422a17cc25 100644 --- a/include/clang/Sema/DeclSpec.h +++ b/include/clang/Sema/DeclSpec.h @@ -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(); } diff --git a/lib/Sema/DeclSpec.cpp b/lib/Sema/DeclSpec.cpp index b531accf86..8ea72ca79c 100644 --- a/lib/Sema/DeclSpec.cpp +++ b/lib/Sema/DeclSpec.cpp @@ -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]) {