Inline a trivial clear() method.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 19 May 2012 14:28:31 +0000 (14:28 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 19 May 2012 14:28:31 +0000 (14:28 +0000)
llvm-svn: 157114

clang/include/clang/Sema/DeclSpec.h
clang/lib/Sema/DeclSpec.cpp

index 67fd393..422a17c 100644 (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(); }
index b531acc..8ea72ca 100644 (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]) {