diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-19 14:28:31 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-19 14:28:31 +0000 |
commit | e2010ee042f3a370b15fda7872b86c914ffad4d2 (patch) | |
tree | 654094ce3f34adeca4cf0be5e5dc0c670ae66958 | |
parent | 93a8534090a6de23d655679205b974032d092a89 (diff) |
Inline a trivial clear() method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157114 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Sema/DeclSpec.h | 10 | ||||
-rw-r--r-- | lib/Sema/DeclSpec.cpp | 7 |
2 files changed, 6 insertions, 11 deletions
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]) { |