From: Benjamin Kramer Date: Sat, 19 May 2012 14:28:31 +0000 (+0000) Subject: Inline a trivial clear() method. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9012a09b1ce3a3c29ad181f04c265ee2a0a03695;p=platform%2Fupstream%2Fllvm.git Inline a trivial clear() method. llvm-svn: 157114 --- diff --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h index 67fd393..422a17c 100644 --- a/clang/include/clang/Sema/DeclSpec.h +++ b/clang/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/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp index b531acc..8ea72ca 100644 --- a/clang/lib/Sema/DeclSpec.cpp +++ b/clang/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]) {